diff options
Diffstat (limited to 'libX11/src/XlibInt.c')
-rw-r--r-- | libX11/src/XlibInt.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/libX11/src/XlibInt.c b/libX11/src/XlibInt.c index a78da9bf1..3db151e29 100644 --- a/libX11/src/XlibInt.c +++ b/libX11/src/XlibInt.c @@ -1574,7 +1574,19 @@ int _XError ( !(*dpy->error_vec[rep->errorCode])(dpy, &event.xerror, rep)) return 0; if (_XErrorFunction != NULL) { - return (*_XErrorFunction)(dpy, (XErrorEvent *)&event); /* upcall */ + int rtn_val; +#ifdef XTHREADS + if (dpy->lock) + (*dpy->lock->user_lock_display)(dpy); + UnlockDisplay(dpy); +#endif + rtn_val = (*_XErrorFunction)(dpy, (XErrorEvent *)&event); /* upcall */ +#ifdef XTHREADS + LockDisplay(dpy); + if (dpy->lock) + (*dpy->lock->user_unlock_display)(dpy); +#endif + return rtn_val; } else { return _XDefaultError(dpy, (XErrorEvent *)&event); } |