aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/lib/X11/PeekEvent.c
diff options
context:
space:
mode:
Diffstat (limited to 'nx-X11/lib/X11/PeekEvent.c')
-rw-r--r--nx-X11/lib/X11/PeekEvent.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/nx-X11/lib/X11/PeekEvent.c b/nx-X11/lib/X11/PeekEvent.c
index b89c6c95e..b8d755f0a 100644
--- a/nx-X11/lib/X11/PeekEvent.c
+++ b/nx-X11/lib/X11/PeekEvent.c
@@ -46,6 +46,12 @@ XPeekEvent (dpy, event)
LockDisplay(dpy);
if (dpy->head == NULL)
_XReadEvents(dpy);
+#ifdef NX_TRANS_SOCKET
+ if (_XGetIOError(dpy)) {
+ UnlockDisplay(dpy);
+ return 1;
+ }
+#endif
*event = (dpy->head)->event;
UnlockDisplay(dpy);
return 1;