[PATCH] Xi: update device state even if no emulated events are sent

carlosg at gnome.org carlosg at gnome.org
Wed Dec 19 09:38:37 PST 2012


From: Carlos Garnacho <carlosg at gnome.org>

A touch sequence emulating pointer events may end up not sending
pointer events (ie. if handled completely by a passive touch grab),
but the device state needs to be updated anyway for subsequent
events to have a correct state.

This patch can be considered a leftover of 863f32c930d7
---
 Xi/exevents.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Xi/exevents.c b/Xi/exevents.c
index 4c1aeb4..d9e4a69 100644
--- a/Xi/exevents.c
+++ b/Xi/exevents.c
@@ -1604,6 +1604,8 @@ ProcessTouchEvent(InternalEvent *ev, DeviceIntPtr dev)
     }
 
     if (!ti) {
+        if (emulate_pointer)
+            UpdateDeviceState(dev, &ev->device_event);
         DebugF("[Xi] %s: Failed to get event %d for touchpoint %d\n",
                dev->name, type, touchid);
         return;
-- 
1.8.0.1



More information about the xorg-devel mailing list