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>
This commit is contained in:
Carlos Garnacho 2012-10-31 19:32:57 +01:00 committed by Peter Hutterer
parent 9a536820f6
commit 863f32c930

View File

@ -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);
}
/**