From 9d6b6891e6de92aaeb51b40a30517b8196553b7a Mon Sep 17 00:00:00 2001 From: thefiddler Date: Tue, 22 Jul 2014 21:02:33 +0200 Subject: [PATCH] [Mac] CursorVisible should only apply when changed This fixes an issue where `NativeWindow.Dispose()` would move the mouse cursor. --- Source/OpenTK/Platform/MacOS/CocoaNativeWindow.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Source/OpenTK/Platform/MacOS/CocoaNativeWindow.cs b/Source/OpenTK/Platform/MacOS/CocoaNativeWindow.cs index d4d6b481..db0e314e 100644 --- a/Source/OpenTK/Platform/MacOS/CocoaNativeWindow.cs +++ b/Source/OpenTK/Platform/MacOS/CocoaNativeWindow.cs @@ -1000,15 +1000,15 @@ namespace OpenTK.Platform.MacOS get { return cursorVisible; } set { - cursorVisible = value; - if (value) + if (value && !cursorVisible) { SetCursorVisible(true); } - else + else if (!value && cursorVisible) { SetCursorVisible(false); } + cursorVisible = value; } }