diff options
author | Carlos Garnacho <carlosg@gnome.org> | 2012-10-31 19:32:57 +0100 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2012-11-06 10:48:32 +1000 |
commit | 863f32c930d71073ee5f78452b78bd459d024867 (patch) | |
tree | f8cac29f95348b5354583b44bcbae78e6268d57c /Xi/exevents.c | |
parent | 9a536820f6174befb22431bab375ef1af0a1ec29 (diff) |
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>
Diffstat (limited to 'Xi/exevents.c')
-rw-r--r-- | Xi/exevents.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Xi/exevents.c b/Xi/exevents.c index 4cbeb3796..5cf873c6e 100644 --- a/Xi/exevents.c +++ b/Xi/exevents.c @@ -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); } /** |