From a07c3cc1eec0427a056414ef44ef6ee4204df383 Mon Sep 17 00:00:00 2001 From: Daniel Stone Date: Wed, 1 Aug 2007 03:03:44 +0300 Subject: XChangeDeviceControl: Fix completely broken locking Drop the display lock when we exit from XChangeDeviceControl(), instead of leaking it. --- src/XChgDCtl.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/XChgDCtl.c b/src/XChgDCtl.c index f7a537a..952164c 100644 --- a/src/XChgDCtl.c +++ b/src/XChgDCtl.c @@ -104,8 +104,11 @@ XChangeDeviceControl(dpy, dev, control, d) UnlockDisplay(dpy); SyncHandle(); return (NoSuchExtension); - } else + } else { + UnlockDisplay(dpy); + SyncHandle(); return (rep.status); + } } case DEVICE_ABS_CALIB: { @@ -132,6 +135,8 @@ XChangeDeviceControl(dpy, dev, control, d) return NoSuchExtension; } else { + UnlockDisplay(dpy); + SyncHandle(); return rep.status; } } @@ -158,6 +163,8 @@ XChangeDeviceControl(dpy, dev, control, d) return NoSuchExtension; } else { + UnlockDisplay(dpy); + SyncHandle(); return rep.status; } } @@ -179,6 +186,8 @@ XChangeDeviceControl(dpy, dev, control, d) return NoSuchExtension; } else { + UnlockDisplay(dpy); + SyncHandle(); return rep.status; } } @@ -200,6 +209,8 @@ XChangeDeviceControl(dpy, dev, control, d) return NoSuchExtension; } else { + UnlockDisplay(dpy); + SyncHandle(); return rep.status; } } -- cgit v1.2.3