[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
This commit is contained in:
Fraser Waters 2015-08-21 23:58:00 +01:00
parent 99ff3d287c
commit d1654d70d5

View file

@ -1480,7 +1480,7 @@ namespace OpenTK.Platform.X11
get { return cursor_visible; } get { return cursor_visible; }
set set
{ {
if (value) if (value && !cursor_visible)
{ {
using (new XLock(window.Display)) using (new XLock(window.Display))
{ {
@ -1495,7 +1495,7 @@ namespace OpenTK.Platform.X11
cursor_visible = true; cursor_visible = true;
} }
} }
else else if(!value && cursor_visible)
{ {
using (new XLock(window.Display)) using (new XLock(window.Display))
{ {