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:
parent
c1a6841a64
commit
3312e4dd5e
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue