summaryrefslogtreecommitdiff
path: root/Xi
diff options
context:
space:
mode:
authorAlexander Volkov <a.volkov@rusbitech.ru>2015-06-17 12:41:35 +0300
committerPeter Hutterer <peter.hutterer@who-t.net>2015-06-18 07:30:39 +1000
commitf4c3cac010cff0980905eeedd8e8d7baf0aff91b (patch)
tree1a16d8f6e1c337bd18b7ec3bd2dd0a6c31c2e801 /Xi
parent990cf5b2828f73dc7a07f1e38f608af39acfd81d (diff)
Xi: call UpdateDeviceState() even when the client is missing
The client window can be closed in the middle of a touch sequence, e.g. Qt 4 closes popup windows on MousePress and Qt 5.5 will do it on TouchBegin. In this case the state of mouse buttons will not be updated on TouchEnd because ProcessTouchEvent() calls UpdateDeviceState() only when the event has been sent to the client. It results in a stuck left mouse button. This patch leads to calling UpdateDeviceState() in case the client can't be found. Signed-off-by: Alexander Volkov <a.volkov@rusbitech.ru> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'Xi')
-rw-r--r--Xi/exevents.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Xi/exevents.c b/Xi/exevents.c
index cd33f94fc..e728310f8 100644
--- a/Xi/exevents.c
+++ b/Xi/exevents.c
@@ -1590,7 +1590,7 @@ ProcessTouchEvent(InternalEvent *ev, DeviceIntPtr dev)
if (!ti) {
DebugF("[Xi] %s: Failed to get event %d for touchpoint %d\n",
dev->name, type, touchid);
- return;
+ goto out;
}
/* if emulate_pointer is set, emulate the motion event right
@@ -1624,6 +1624,7 @@ ProcessTouchEvent(InternalEvent *ev, DeviceIntPtr dev)
if (ev->any.type == ET_TouchEnd)
TouchEndTouch(dev, ti);
+ out:
if (emulate_pointer)
UpdateDeviceState(dev, &ev->device_event);
}