mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2025-12-25 11:50:06 +01:00
Xi: Update the device after delivering the emulated pointer event(#56558)
Ensure emulated pointer events contain the state that applies before the
event was processed, so the device state must be updated after delivering
such emulated events.
Co-authored-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Carlos Garnacho <carlosg@gnome.org>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 863f32c930)
This commit is contained in:
parent
10d9cd36b4
commit
2f99b38747
1 changed files with 4 additions and 3 deletions
|
|
@ -1568,9 +1568,6 @@ ProcessTouchEvent(InternalEvent *ev, DeviceIntPtr dev)
|
|||
else
|
||||
touchid = ev->device_event.touchid;
|
||||
|
||||
if (emulate_pointer)
|
||||
UpdateDeviceState(dev, &ev->device_event);
|
||||
|
||||
if (type == ET_TouchBegin) {
|
||||
ti = TouchBeginTouch(dev, ev->device_event.sourceid, touchid,
|
||||
emulate_pointer);
|
||||
|
|
@ -1617,6 +1614,7 @@ ProcessTouchEvent(InternalEvent *ev, DeviceIntPtr dev)
|
|||
* events which _only_ emulate motion just work normally */
|
||||
if (emulate_pointer && ev->any.type != ET_TouchUpdate)
|
||||
DeliverEmulatedMotionEvent(dev, ti, ev);
|
||||
|
||||
if (emulate_pointer && IsMaster(dev))
|
||||
CheckMotion(&ev->device_event, dev);
|
||||
|
||||
|
|
@ -1641,6 +1639,9 @@ ProcessTouchEvent(InternalEvent *ev, DeviceIntPtr dev)
|
|||
if (ev->any.type == ET_TouchEnd)
|
||||
TouchEndTouch(dev, ti);
|
||||
}
|
||||
|
||||
if (emulate_pointer)
|
||||
UpdateDeviceState(dev, &ev->device_event);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue