summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stone <daniel@fooishbar.org>2007-08-01 03:03:44 +0300
committerDaniel Stone <daniel@fooishbar.org>2007-08-01 03:03:44 +0300
commita07c3cc1eec0427a056414ef44ef6ee4204df383 (patch)
tree34dbdc486c7ef75a1caff7cadb4e579cc5adb390
parent7f1b5257b7eb0c873988c33453c110fc5f9996dd (diff)
XChangeDeviceControl: Fix completely broken locking
Drop the display lock when we exit from XChangeDeviceControl(), instead of leaking it.
-rw-r--r--src/XChgDCtl.c13
1 files changed, 12 insertions, 1 deletions
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;
}
}