[X11] Fixed cursor position when CursorVisible becomes true

This commit is contained in:
thefiddler 2014-05-13 13:23:20 +02:00
parent fc718026fd
commit 7e3b99c636

View file

@ -1499,6 +1499,10 @@ namespace OpenTK.Platform.X11
{ {
using (new XLock(window.Display)) using (new XLock(window.Display))
{ {
Point p = PointToScreen(new Point(MouseState.X, MouseState.Y));
Mouse.SetPosition(p.X, p.Y);
Functions.XFlush(window.Display);
// Note: if cursorHandle = IntPtr.Zero, this function // Note: if cursorHandle = IntPtr.Zero, this function
// is equivalent to XUndefineCursor. // is equivalent to XUndefineCursor.
Functions.XDefineCursor(window.Display, window.Handle, cursorHandle); Functions.XDefineCursor(window.Display, window.Handle, cursorHandle);