<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jul 11, 2014 at 1:54 PM,  <span dir="ltr"><<a href="mailto:otaylor@redhat.com" target="_blank">otaylor@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
From: "Owen W. Taylor" <<a href="mailto:otaylor@fishsoup.net">otaylor@fishsoup.net</a>><br>
<br>
Fix two places where the display was double locked when an API<br>
function chained to an implementation that also locks the display.<br>
---<br>
 src/XIAllowEvents.c | 6 +-----<br>
 src/XIPassiveGrab.c | 1 +<br>
 2 files changed, 2 insertions(+), 5 deletions(-)<br>
<br>
diff --git a/src/XIAllowEvents.c b/src/XIAllowEvents.c<br>
index c8d997a..b0be6bb 100644<br>
--- a/src/XIAllowEvents.c<br>
+++ b/src/XIAllowEvents.c<br>
@@ -92,11 +92,7 @@ XIAllowTouchEvents(Display *dpy, int deviceid, unsigned int touchid,<br>
     LockDisplay(dpy);<br>
     if (_XiCheckExtInit(dpy, XInput_2_2, extinfo) == -1)<br>
        return (NoSuchExtension);<br>
-<br>
-    status = _XIAllowEvents(dpy, deviceid, event_mode, CurrentTime, touchid, grab_window);<br>
-<br>
     UnlockDisplay(dpy);<br>
-    SyncHandle();<br>
<br>
-    return status;<br>
+    return _XIAllowEvents(dpy, deviceid, event_mode, CurrentTime, touchid, grab_window);<br></blockquote><div><br></div><div>Shouldn't you remove the declaration for "status" here?<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

 }<br>
diff --git a/src/XIPassiveGrab.c b/src/XIPassiveGrab.c<br>
index 88f1aff..c743516 100644<br>
--- a/src/XIPassiveGrab.c<br>
+++ b/src/XIPassiveGrab.c<br>
@@ -249,6 +249,7 @@ XIUngrabTouchBegin(Display* display, int deviceid, Window grab_window,<br>
     LockDisplay(display);<br>
     if (_XiCheckExtInit(display, XInput_2_2, extinfo) == -1)<br>
        return -1;<br>
+    UnlockDisplay(display);<br>
<br>
     return _XIPassiveUngrabDevice(display, deviceid, XIGrabtypeTouchBegin, 0,<br>
                                   grab_window, num_modifiers, modifiers);<br>
<span class="HOEnZb"><font color="#888888">--<br>
1.9.3<br>
<br>
_______________________________________________<br>
<a href="mailto:xorg-devel@lists.x.org">xorg-devel@lists.x.org</a>: X.Org development<br>
Archives: <a href="http://lists.x.org/archives/xorg-devel" target="_blank">http://lists.x.org/archives/xorg-devel</a><br>
Info: <a href="http://lists.x.org/mailman/listinfo/xorg-devel" target="_blank">http://lists.x.org/mailman/listinfo/xorg-devel</a><br>
</font></span></blockquote></div><br><br clear="all"><br>-- <br>  Jasper<br>
</div></div>