mirror of
https://github.com/Ryujinx/Opentk.git
synced 2025-03-08 10:10:00 +00:00
[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:
parent
99ff3d287c
commit
d1654d70d5
|
@ -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))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue