Commit b731d135 authored by Owen Taylor's avatar Owen Taylor Committed by Peter Hutterer

Fix locking bugs with XIAllowTouchEvents() and XIUngrabTouchBegin()

Fix two places where the display was double locked when an API
function chained to an implementation that also locks the display.
Reviewed-by: Peter Hutterer's avatarPeter Hutterer <>
Signed-off-by: Peter Hutterer's avatarPeter Hutterer <>
parent 0250f40f
......@@ -86,17 +86,12 @@ Status
XIAllowTouchEvents(Display *dpy, int deviceid, unsigned int touchid,
Window grab_window, int event_mode)
int status;
XExtDisplayInfo *extinfo = XInput_find_display(dpy);
if (_XiCheckExtInit(dpy, XInput_2_2, extinfo) == -1)
return (NoSuchExtension);
status = _XIAllowEvents(dpy, deviceid, event_mode, CurrentTime, touchid, grab_window);
return status;
return _XIAllowEvents(dpy, deviceid, event_mode, CurrentTime, touchid, grab_window);
......@@ -249,6 +249,7 @@ XIUngrabTouchBegin(Display* display, int deviceid, Window grab_window,
if (_XiCheckExtInit(display, XInput_2_2, extinfo) == -1)
return -1;
return _XIPassiveUngrabDevice(display, deviceid, XIGrabtypeTouchBegin, 0,
grab_window, num_modifiers, modifiers);
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