Remove a lock on a read-only operation, in IsCurrent()
authorShane Kelly <shane.sparky.kelly@gmail.com>
Sat, 9 Dec 2017 10:19:41 +0000 (12:19 +0200)
committerShane Kelly <shane.sparky.kelly@gmail.com>
Sat, 9 Dec 2017 10:19:41 +0000 (12:19 +0200)
src/OpenTK/Platform/X11/X11GLContext.cs

index e0763fa..24c3b91 100644 (file)
@@ -346,10 +346,6 @@ namespace OpenTK.Platform.X11
                     currentWindow = w;
                 }
 
-
-
-
-
                 if (!result)
                 {
                     throw new GraphicsContextException("Failed to make context current.");
@@ -367,10 +363,7 @@ namespace OpenTK.Platform.X11
         {
             get
             {
-                using (new XLock(Display))
-                {
-                    return Glx.GetCurrentContext() == Handle.Handle;
-                }
+                return Glx.GetCurrentContext() == Handle.Handle;
             }
         }