summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJasper St. Pierre <jstpierre@mecheye.net>2014-07-08 17:01:04 -0400
committerPeter Hutterer <peter.hutterer@who-t.net>2014-07-10 08:49:37 +1000
commitaa628936c7d81ff5fe2da62964dc543c67ec66f1 (patch)
treed23db9eb9cd70ec4e567ecd46f510eeb392bad18
parenteb0c522e0ce5763b6bf181f1236e78ca94f98b7e (diff)
XIPassiveGrab: Fix completely broken locking in XIGrabTouchBegin
_XIPassiveGrabDevice calls LockDisplay as the first thing it does. That means that it expects the display to be unlocked. XIGrabTouchBegin locks the display to check for the XI extension, and then never unlocks it. Effectively, this meant that anybody that called XIGrabTouchBegin after XInitThreads just got a deadlock. Cool. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r--src/XIPassiveGrab.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/XIPassiveGrab.c b/src/XIPassiveGrab.c
index f3a9924..88f1aff 100644
--- a/src/XIPassiveGrab.c
+++ b/src/XIPassiveGrab.c
@@ -166,6 +166,7 @@ XIGrabTouchBegin(Display *dpy, int deviceid, Window grab_window,
LockDisplay(dpy);
if (_XiCheckExtInit(dpy, XInput_2_2, extinfo) == -1)
return -1;
+ UnlockDisplay(dpy);
/* FIXME: allow selection of GrabMode for paired devices? */
return _XIPassiveGrabDevice(dpy, deviceid, XIGrabtypeTouchBegin, 0,