diff options
author | Ulrich Sibiller <uli42@gmx.de> | 2016-06-24 21:22:01 +0200 |
---|---|---|
committer | Ulrich Sibiller <uli42@gmx.de> | 2016-06-24 21:30:02 +0200 |
commit | 5ee04c24c5b7cafc7ed01ae586b5910be73271ff (patch) | |
tree | 5e596ec83c786375bab97b0695cd7cf124b0bd66 /nx-X11/lib/X11/PeekIfEv.c | |
parent | 17f3e3bc5157eeb6018ddaa6d862ca94f4b02b2b (diff) | |
download | nx-libs-5ee04c24c5b7cafc7ed01ae586b5910be73271ff.tar.gz nx-libs-5ee04c24c5b7cafc7ed01ae586b5910be73271ff.tar.bz2 nx-libs-5ee04c24c5b7cafc7ed01ae586b5910be73271ff.zip |
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
Diffstat (limited to 'nx-X11/lib/X11/PeekIfEv.c')
-rw-r--r-- | nx-X11/lib/X11/PeekIfEv.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/nx-X11/lib/X11/PeekIfEv.c b/nx-X11/lib/X11/PeekIfEv.c index a8da27932..93a725b49 100644 --- a/nx-X11/lib/X11/PeekIfEv.c +++ b/nx-X11/lib/X11/PeekIfEv.c @@ -73,6 +73,7 @@ XPeekIfEvent (dpy, event, predicate, arg) prev = NULL; #ifdef NX_TRANS_SOCKET if (_XGetIOError(dpy)) { + UnlockDisplay(dpy); return 0; } #endif |