mirror of
https://github.com/Ryujinx/Opentk.git
synced 2024-12-26 03:15:40 +00:00
* Source/OpenTK/Platform/X11/X11GLNative.cs: Confine pointer to
window when it becomes invisible.
This commit is contained in:
parent
527cdf8622
commit
33529aff63
|
@ -1329,6 +1329,7 @@ namespace OpenTK.Platform.X11
|
||||||
{
|
{
|
||||||
using (new XLock(window.Display))
|
using (new XLock(window.Display))
|
||||||
{
|
{
|
||||||
|
Functions.XUngrabPointer(window.Display, IntPtr.Zero);
|
||||||
Functions.XUndefineCursor(window.Display, window.WindowHandle);
|
Functions.XUndefineCursor(window.Display, window.WindowHandle);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1337,6 +1338,11 @@ namespace OpenTK.Platform.X11
|
||||||
using (new XLock(window.Display))
|
using (new XLock(window.Display))
|
||||||
{
|
{
|
||||||
Functions.XDefineCursor(window.Display, window.WindowHandle, EmptyCursor);
|
Functions.XDefineCursor(window.Display, window.WindowHandle, EmptyCursor);
|
||||||
|
Functions.XGrabPointer(window.Display, window.WindowHandle, true,
|
||||||
|
EventMask.PointerMotionMask | EventMask.ButtonPressMask | EventMask.ButtonReleaseMask,
|
||||||
|
GrabMode.GrabModeAsync, GrabMode.GrabModeAsync, window.WindowHandle, IntPtr.Zero,
|
||||||
|
IntPtr.Zero);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue