diff options
Diffstat (limited to 'src/XISelEv.c')
-rw-r--r-- | src/XISelEv.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/XISelEv.c b/src/XISelEv.c index 55c0a6a..aeee1e3 100644 --- a/src/XISelEv.c +++ b/src/XISelEv.c @@ -60,7 +60,7 @@ XISelectEvents(Display* dpy, Window win, XIEventMask* masks, int num_masks) LockDisplay(dpy); if (_XiCheckExtInit(dpy, XInput_2_0, info) == -1) { r = NoSuchExtension; - goto out; + goto out_unlocked; } for (i = 0; i < num_masks; i++) { @@ -114,6 +114,7 @@ XISelectEvents(Display* dpy, Window win, XIEventMask* masks, int num_masks) free(buff); out: UnlockDisplay(dpy); +out_unlocked: SyncHandle(); return r; @@ -134,7 +135,7 @@ XIGetSelectedEvents(Display* dpy, Window win, int *num_masks_return) *num_masks_return = -1; LockDisplay(dpy); if (_XiCheckExtInit(dpy, XInput_2_0, info) == -1) - goto out; + goto out_unlocked; GetReq(XIGetSelectedEvents, req); @@ -209,6 +210,8 @@ out: Xfree(mask_in); UnlockDisplay(dpy); + +out_unlocked: SyncHandle(); return mask_out; |