[client] x11: register for absolute motion events while grabbed

This commit is contained in:
Geoffrey McRae 2021-01-20 05:51:18 +11:00
parent 5789a7efc0
commit d1043e590a
2 changed files with 2 additions and 4 deletions

View File

@ -467,9 +467,6 @@ static bool x11EventFilter(SDL_Event * event)
case XI_Motion:
{
if (!x11.focused || !x11.entered)
return true;
XIDeviceEvent *device = cookie->data;
app_updateCursorPos(device->event_x, device->event_y);
return true;
@ -588,6 +585,7 @@ static void x11GrabPointer(void)
XISetMask(mask.mask, XI_RawButtonPress );
XISetMask(mask.mask, XI_RawButtonRelease);
XISetMask(mask.mask, XI_RawMotion );
XISetMask(mask.mask, XI_Motion );
XIGrabDevice(
x11.display,
@ -599,6 +597,7 @@ static void x11GrabPointer(void)
GrabModeAsync,
false,
&mask);
XSync(x11.display, False);
x11.pointerGrabbed = true;

View File

@ -1356,7 +1356,6 @@ void app_handleMouseNormal(double ex, double ey)
/* ungrab the pointer and move the local cursor to the exit point */
g_state.ds->ungrabPointer();
warpPointer(tx, ty, true);
return;
}