diff --git a/ChangeLog b/ChangeLog index b04097b..1d418cb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-10-25 Thomas Gamper + + * Source/x11/XGServerWindow.m + Implement setMouseLocation:onScreen:. + 2009-10-25 Thomas Gamper * Source/x11/XGGLContext.m diff --git a/Source/x11/XGServerWindow.m b/Source/x11/XGServerWindow.m index 7564e8e..21ba16d 100644 --- a/Source/x11/XGServerWindow.m +++ b/Source/x11/XGServerWindow.m @@ -3653,6 +3653,19 @@ static BOOL didCreatePixmaps; grab_window = NULL; } +- (void) setMouseLocation: (NSPoint)mouseLocation onScreen: (int)aScreen +{ + int height; + int destX, destY; + + height = DisplayHeight(dpy, aScreen); + destY = height - mouseLocation.y; + destX = mouseLocation.x; + + XWarpPointer(dpy, None, [self xDisplayRootWindowForScreen: aScreen], + 0, 0, 0, 0, destX, destY); +} + - (void) setinputfocus: (int)win { gswindow_device_t *window = WINDOW_WITH_TAG(win);