sync_while_locked grabs the user lock before performing the sync operation. Telling InternalLockDisplay to wait for the user lock will thus deadlock, so don't do that.
Signed-off-by: Keith Packard <[email protected]> --- I don't know how this could ever have failed to deadlock -- sync_while_locked has called _XUserLockDisplay, and so locking_level is non-zero. When _XInternalLockDisplay finds locking_level > 0, it then calls _XDisplayLockWait, which is going to hang around for a *very long time* as the lock is held by the current thread. This patch fixes my application nicely, but I'd love to have someone sanity check this... src/XlibInt.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/XlibInt.c b/src/XlibInt.c index a8f5d08..12b816f 100644 --- a/src/XlibInt.c +++ b/src/XlibInt.c @@ -214,7 +214,7 @@ void sync_while_locked(Display *dpy) #endif UnlockDisplay(dpy); SyncHandle(); - InternalLockDisplay(dpy, /* don't skip user locks */ 0); + InternalLockDisplay(dpy, /* skip user locks */ 1); #ifdef XTHREADS if (dpy->lock) (*dpy->lock->user_unlock_display)(dpy); -- 1.7.9 _______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
