Commit aa628936 authored by Jasper St. Pierre's avatar Jasper St. Pierre Committed by Peter Hutterer

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's avatarPeter Hutterer <peter.hutterer@who-t.net>
parent eb0c522e
......@@ -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,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment