Added the XWarpointer call again - this time centering the pointer

This commit is contained in:
Elias Naur 2002-11-30 21:25:00 +00:00
parent 60e0ee6c01
commit 4641d82e43
3 changed files with 62 additions and 0 deletions

View file

@ -133,6 +133,7 @@ int grabPointer(void) {
int mask = EnterWindowMask | LeaveWindowMask | PointerMotionMask | ButtonPressMask | ButtonReleaseMask;
if (current_fullscreen) {
result = XGrabPointer(disp, win, False, mask, GrabModeAsync, GrabModeAsync, win, blank_cursor, CurrentTime);
XWarpPointer(disp, None, win, 0, 0, 0, 0, current_x, current_y);
XF86VidModeSetViewPort(disp, screen, 0, 0); // make sure we have a centered window
} else
result = XGrabPointer(disp, win, False, mask, GrabModeAsync, GrabModeAsync, None, blank_cursor, CurrentTime);