[Mac] CursorVisible should only apply when changed

This fixes an issue where `NativeWindow.Dispose()` would move the mouse
cursor.
This commit is contained in:
thefiddler 2014-07-22 21:02:33 +02:00
parent 0c4081f6ef
commit 9d6b6891e6

View file

@ -1000,15 +1000,15 @@ namespace OpenTK.Platform.MacOS
get { return cursorVisible; } get { return cursorVisible; }
set set
{ {
cursorVisible = value; if (value && !cursorVisible)
if (value)
{ {
SetCursorVisible(true); SetCursorVisible(true);
} }
else else if (!value && cursorVisible)
{ {
SetCursorVisible(false); SetCursorVisible(false);
} }
cursorVisible = value;
} }
} }