mirror of
https://github.com/X11Libre/xserver.git
synced 2026-04-05 11:12:42 +00:00
Call CheckMotion for all core events.
We need to do this to update the sprites x/y coordinate before we assemble a button event. Absolute devices may send a buttonEvent with valuators attached. If we don't update the sprite before assembling the event, the valuators are lost and the button press is delivered to the previous position of the device. Doesn't have any effect on relative devices.
This commit is contained in:
@@ -3634,6 +3634,12 @@ ProcessPointerEvent (xEvent *xE, DeviceIntPtr mouse, int count)
|
||||
CallCallbacks(&DeviceEventCallback, (pointer)&eventinfo);
|
||||
}
|
||||
}
|
||||
/* We need to call CheckMotion for each event. It doesn't really give us
|
||||
any benefit for relative devices, but absolute devices won't send
|
||||
button events to the right position.
|
||||
*/
|
||||
if (!CheckMotion(xE, mouse) && xE->u.u.type == MotionNotify)
|
||||
return;
|
||||
if (xE->u.u.type != MotionNotify)
|
||||
{
|
||||
int key;
|
||||
@@ -3682,8 +3688,7 @@ ProcessPointerEvent (xEvent *xE, DeviceIntPtr mouse, int count)
|
||||
FatalError("bogus pointer event from ddx");
|
||||
}
|
||||
}
|
||||
else if (!CheckMotion(xE, mouse))
|
||||
return;
|
||||
|
||||
if (grab)
|
||||
DeliverGrabbedEvent(xE, mouse, deactivateGrab, count);
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user