From cec31e2f06b29b332ee78cfefeefa7bfa136be75 Mon Sep 17 00:00:00 2001 From: Ulrich Sibiller Date: Sat, 25 Jun 2016 00:31:05 +0200 Subject: Xinerama: undef debug/test flags --- nx-X11/programs/Xserver/hw/nxagent/Screen.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'nx-X11') diff --git a/nx-X11/programs/Xserver/hw/nxagent/Screen.c b/nx-X11/programs/Xserver/hw/nxagent/Screen.c index 40b1e5222..4b18653a6 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Screen.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Screen.c @@ -104,10 +104,10 @@ is" without express or implied warranty. * Set here the required log level. */ -#define PANIC -#define WARNING -#define TEST -#define DEBUG +#undef PANIC +#undef WARNING +#undef TEST +#undef DEBUG #undef WATCH #undef DUMP -- cgit v1.2.3 From e079b0b35dd4a775d786ad5d594845cac666d8ac Mon Sep 17 00:00:00 2001 From: Ulrich Sibiller Date: Sat, 25 Jun 2016 00:31:35 +0200 Subject: Screen.c: fix RRGetInfo call --- nx-X11/programs/Xserver/hw/nxagent/Screen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'nx-X11') diff --git a/nx-X11/programs/Xserver/hw/nxagent/Screen.c b/nx-X11/programs/Xserver/hw/nxagent/Screen.c index 4b18653a6..de8c97532 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Screen.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Screen.c @@ -3799,7 +3799,7 @@ int nxagentAdjustRandRXinerama(ScreenPtr pScreen) } #else /* we are not interested in the return code */ - RRGetInfo(pScreen); + RRGetInfo(pScreen, FALSE); #endif #ifndef NXAGENT_RANDR_XINERAMA_CLIPPING -- cgit v1.2.3 From b7d7ff3e4d1be2d6b8ca0895cf9694dddcffa646 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/IfEvent.c | 1 + nx-X11/lib/X11/MaskEvent.c | 1 + nx-X11/lib/X11/NextEvent.c | 6 ++++++ nx-X11/lib/X11/PeekEvent.c | 6 ++++++ nx-X11/lib/X11/PeekIfEv.c | 1 + nx-X11/lib/X11/WinEvent.c | 6 ++++++ 6 files changed, 21 insertions(+) (limited to 'nx-X11') diff --git a/nx-X11/lib/X11/IfEvent.c b/nx-X11/lib/X11/IfEvent.c index a7c0cb188..9cf07f56d 100644 --- a/nx-X11/lib/X11/IfEvent.c +++ b/nx-X11/lib/X11/IfEvent.c @@ -73,6 +73,7 @@ XIfEvent (dpy, event, predicate, arg) prev = NULL; #ifdef NX_TRANS_SOCKET if (_XGetIOError(dpy)) { + UnlockDisplay(dpy); return 0; } #endif 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 diff --git a/nx-X11/lib/X11/NextEvent.c b/nx-X11/lib/X11/NextEvent.c index 1c9080651..71d84223e 100644 --- a/nx-X11/lib/X11/NextEvent.c +++ b/nx-X11/lib/X11/NextEvent.c @@ -48,6 +48,12 @@ XNextEvent (dpy, event) if (dpy->head == NULL) _XReadEvents(dpy); +#ifdef NX_TRANS_SOCKET + if (_XGetIOError(dpy)) { + UnlockDisplay(dpy); + return 0; + } +#endif qelt = dpy->head; *event = qelt->event; _XDeq(dpy, NULL, qelt); 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; 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 diff --git a/nx-X11/lib/X11/WinEvent.c b/nx-X11/lib/X11/WinEvent.c index 67e825cb5..961fcf74b 100644 --- a/nx-X11/lib/X11/WinEvent.c +++ b/nx-X11/lib/X11/WinEvent.c @@ -79,5 +79,11 @@ XWindowEvent (dpy, w, mask, event) if (prev && prev->qserial_num != qe_serial) /* another thread has snatched this event */ prev = NULL; +#ifdef NX_TRANS_SOCKET + if (_XGetIOError(dpy)) { + UnlockDisplay(dpy); + return 0; + } +#endif } } -- cgit v1.2.3