Skip to content

Commit

Permalink
[X11] Fix CursorVisible
Browse files Browse the repository at this point in the history
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 opentk#281
  • Loading branch information
Frassle committed Aug 21, 2015
1 parent 99ff3d2 commit d1654d7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Source/OpenTK/Platform/X11/X11GLNative.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1480,7 +1480,7 @@ public override bool CursorVisible
get { return cursor_visible; }
set
{
if (value)
if (value && !cursor_visible)
{
using (new XLock(window.Display))
{
Expand All @@ -1495,7 +1495,7 @@ public override bool CursorVisible
cursor_visible = true;
}
}
else
else if(!value && cursor_visible)
{
using (new XLock(window.Display))
{
Expand Down

0 comments on commit d1654d7

Please sign in to comment.