From 5ee04c24c5b7cafc7ed01ae586b5910be73271ff Mon Sep 17 00:00:00 2001 From: Ulrich Sibiller Date: Fri, 24 Jun 2016 21:22:01 +0200 Subject: libX11: Extend Event functions to handle IOErrors To allow for suspend/resume NX has changed _XReadEvents() and _XIOError(). _XIOError() does not simply exit but returns. And _XReadEvents() returns after _XIOError(). But as the original _XReadEvents() is supposed to block until at least one event is there calling functions are not prepared for situations where no event is available. These calling functions have to check that condition., Some of the calling functions already had that check but the UnlockDisplay() call was missing. Fixes https://github.com/ArcticaProject/nx-libs/issues/118 --- nx-X11/lib/X11/MaskEvent.c | 1 + 1 file changed, 1 insertion(+) (limited to 'nx-X11/lib/X11/MaskEvent.c') diff --git a/nx-X11/lib/X11/MaskEvent.c b/nx-X11/lib/X11/MaskEvent.c index c48a960d2..a46766685 100644 --- a/nx-X11/lib/X11/MaskEvent.c +++ b/nx-X11/lib/X11/MaskEvent.c @@ -77,6 +77,7 @@ XMaskEvent (dpy, mask, event) prev = NULL; #ifdef NX_TRANS_SOCKET if (_XGetIOError(dpy)) { + UnlockDisplay(dpy); return 0; } #endif -- cgit v1.2.3