From d1654d70d5fff49a4bb2e699ed17f2fa8b8d3439 Mon Sep 17 00:00:00 2001 From: Fraser Waters Date: Fri, 21 Aug 2015 23:58:00 +0100 Subject: [PATCH] [X11] Fix CursorVisible Change X11 CursorVisible to only execute if a change is actually needed, that is if we're going from visible to not visible or vice versa. Fixes #281 --- Source/OpenTK/Platform/X11/X11GLNative.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/OpenTK/Platform/X11/X11GLNative.cs b/Source/OpenTK/Platform/X11/X11GLNative.cs index 5b4e38f..46099c3 100644 --- a/Source/OpenTK/Platform/X11/X11GLNative.cs +++ b/Source/OpenTK/Platform/X11/X11GLNative.cs @@ -1480,7 +1480,7 @@ namespace OpenTK.Platform.X11 get { return cursor_visible; } set { - if (value) + if (value && !cursor_visible) { using (new XLock(window.Display)) { @@ -1495,7 +1495,7 @@ namespace OpenTK.Platform.X11 cursor_visible = true; } } - else + else if(!value && cursor_visible) { using (new XLock(window.Display)) { -- 2.7.4