From e335698c07d96ea13d4d4998e6320476d26041fd Mon Sep 17 00:00:00 2001 From: Shane Kelly Date: Sat, 9 Dec 2017 12:19:41 +0200 Subject: [PATCH] Remove a lock on a read-only operation, in IsCurrent() --- src/OpenTK/Platform/X11/X11GLContext.cs | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/OpenTK/Platform/X11/X11GLContext.cs b/src/OpenTK/Platform/X11/X11GLContext.cs index e0763fa1..24c3b91d 100644 --- a/src/OpenTK/Platform/X11/X11GLContext.cs +++ b/src/OpenTK/Platform/X11/X11GLContext.cs @@ -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; } }