Hi Josh and Jamey,
Could you have a look at this bug and David's patch? It looks like the
locking in XChangeDeviceControl() and XGetSelectedExtensionEvents()
causes problems.
Thanks,
Julien
On Wed, Jul 4, 2007 at 04:00:45 +0200, David Weinehall wrote:
> The attached patch seems to fix the issue with xsetwacom (and should fix
> some other locking issues in libxi6 at the same time).
>
> Hopefully correct; this is my first dive into X-land =)
>
>
> Regards: David
> --
> /) David Weinehall <tao@debian.org> /) Rime on my window (\
> // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Diamond-white roses of fire //
> \) http://www.acc.umu.se/~tao/ (/ Beautiful hoar-frost (/
> diff -urN tmp/libxi-1.1.0/src/XChgDCtl.c libxi-1.1.0/src/XChgDCtl.c
> --- tmp/libxi-1.1.0/src/XChgDCtl.c 2006-10-21 12:07:21.000000000 +0300
> +++ libxi-1.1.0/src/XChgDCtl.c 2007-07-04 04:21:16.000000000 +0300
> @@ -105,6 +105,8 @@
> SyncHandle();
> return (NoSuchExtension);
> } else
> + UnlockDisplay(dpy);
> + SyncHandle();
> return (rep.status);
> }
> case DEVICE_ABS_CALIB:
> @@ -132,6 +134,8 @@
> return NoSuchExtension;
> }
> else {
> + UnlockDisplay(dpy);
> + SyncHandle();
> return rep.status;
> }
> }
> @@ -158,6 +162,8 @@
> return NoSuchExtension;
> }
> else {
> + UnlockDisplay(dpy);
> + SyncHandle();
> return rep.status;
> }
> }
> @@ -179,6 +185,8 @@
> return NoSuchExtension;
> }
> else {
> + UnlockDisplay(dpy);
> + SyncHandle();
> return rep.status;
> }
> }
> @@ -200,6 +208,8 @@
> return NoSuchExtension;
> }
> else {
> + UnlockDisplay(dpy);
> + SyncHandle();
> return rep.status;
> }
> }
> diff -urN tmp/libxi-1.1.0/src/XGtSelect.c libxi-1.1.0/src/XGtSelect.c
> --- tmp/libxi-1.1.0/src/XGtSelect.c 2006-10-20 00:45:43.000000000 +0300
> +++ libxi-1.1.0/src/XGtSelect.c 2007-07-04 04:25:22.000000000 +0300
> @@ -106,6 +106,8 @@
> sizeof(XEventClass));
> if (!*this_client_list) {
> _XEatData(dpy, (unsigned long)tlen + alen);
> + UnlockDisplay(dpy);
> + SyncHandle();
> return (Success);
> }
> for (i = 0; i < *this_client_count; i++) {
> @@ -122,6 +124,8 @@
> Xfree((char *)*this_client_list);
> *this_client_list = NULL;
> _XEatData(dpy, (unsigned long)alen);
> + UnlockDisplay(dpy);
> + SyncHandle();
> return (Success);
> }
> for (i = 0; i < *all_clients_count; i++) {
Attachment:
signature.asc
Description: Digital signature