aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/hw/nxagent/Handlers.c
diff options
context:
space:
mode:
Diffstat (limited to 'nx-X11/programs/Xserver/hw/nxagent/Handlers.c')
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Handlers.c30
1 files changed, 27 insertions, 3 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Handlers.c b/nx-X11/programs/Xserver/hw/nxagent/Handlers.c
index 3abc3575f..be407f160 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Handlers.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Handlers.c
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
@@ -105,6 +105,13 @@
#define MINIMUM_DISPLAY_BUFFER 512
+#ifdef NX_DEBUG_INPUT
+extern int nxagentDebugInputDevices;
+extern unsigned long nxagentLastInputDevicesDumpTime;
+
+extern void nxagentDumpInputDevicesState(void);
+#endif
+
/*
* Used in the handling of the X desktop
* manager protocol.
@@ -186,6 +193,18 @@ void nxagentBlockHandler(pointer data, struct timeval **timeout, pointer mask)
now = GetTimeInMillis();
+ #ifdef NX_DEBUG_INPUT
+
+ if (nxagentDebugInputDevices == 1 &&
+ now - nxagentLastInputDevicesDumpTime > 5000)
+ {
+ nxagentLastInputDevicesDumpTime = now;
+
+ nxagentDumpInputDevicesState();
+ }
+
+ #endif
+
if (nxagentNeedConnectionChange() == 1)
{
#ifdef TEST
@@ -508,7 +527,8 @@ void nxagentBlockHandler(pointer data, struct timeval **timeout, pointer mask)
synchronize, nxagentReady);
#endif
- if (nxagentQueuedEvents(nxagentDisplay) > 0)
+ if (NXDisplayError(nxagentDisplay) == 0 &&
+ nxagentQueuedEvents(nxagentDisplay) > 0)
{
#ifdef WARNING
fprintf(stderr, "nxagentBlockHandler: WARNING! Forcing a null timeout with events queued.\n");
@@ -540,6 +560,8 @@ void nxagentBlockHandler(pointer data, struct timeval **timeout, pointer mask)
#endif
+ nxagentPrintGeometry();
+
#ifdef BLOCKS
fprintf(stderr, "[End block]\n");
#endif
@@ -820,6 +842,8 @@ FIXME: Must queue multiple writes and handle
#endif
+ nxagentPrintGeometry();
+
#ifdef BLOCKS
fprintf(stderr, "[End block]\n");
#endif