aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/hw
diff options
context:
space:
mode:
authorUlrich Sibiller <uli42@gmx.de>2019-08-14 20:59:49 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2019-08-27 14:10:16 +0200
commit6181aa9113cc1e852d405ef85c184e32e7fad6c4 (patch)
tree0a78eff800b566497b0de09101a959c5f4abd977 /nx-X11/programs/Xserver/hw
parent063813d35549a52358b0df8e5ede4e105f2e4d96 (diff)
downloadnx-libs-6181aa9113cc1e852d405ef85c184e32e7fad6c4.tar.gz
nx-libs-6181aa9113cc1e852d405ef85c184e32e7fad6c4.tar.bz2
nx-libs-6181aa9113cc1e852d405ef85c184e32e7fad6c4.zip
Events.c: introduce separate debug level for autograb debugging only
We should do something similar for all subsystems over time...
Diffstat (limited to 'nx-X11/programs/Xserver/hw')
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Events.c23
1 files changed, 16 insertions, 7 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Events.c b/nx-X11/programs/Xserver/hw/nxagent/Events.c
index f3e7880c8..4a6a05482 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Events.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Events.c
@@ -115,6 +115,15 @@
#undef TEST
#undef DEBUG
+/* debug individual subsystems */
+#undef DEBUG_AUTOGRAB
+
+/* aktivate subsystems if generic DEBUG is activated */
+#ifdef DEBUG
+#ifndef DEBUG_AUTOGRAB
+#define DEBUG_AUTOGRAB
+#endif
+#endif
/*
* Log begin and end of the important handlers.
*/
@@ -706,9 +715,9 @@ static void nxagentSwitchDeferMode(void)
static void nxagentEnableAutoGrab(void)
{
-#ifdef DEBUG
+ #ifdef DEBUG_AUTOGRAB
fprintf(stderr, "enabling autograb\n");
-#endif
+ #endif
nxagentGrabPointerAndKeyboard(NULL);
nxagentChangeOption(AutoGrab, True);
@@ -717,9 +726,9 @@ static void nxagentEnableAutoGrab(void)
static void nxagentDisableAutoGrab(void)
{
-#ifdef DEBUG
+ #ifdef DEBUG_AUTOGRAB
fprintf(stderr, "disabling autograb\n");
-#endif
+ #endif
nxagentUngrabPointerAndKeyboard(NULL);
nxagentChangeOption(AutoGrab, False);
@@ -1603,14 +1612,14 @@ FIXME: Don't enqueue the KeyRelease event if the key was
{
if (X.xfocus.window == nxagentDefaultWindows[0] && X.xfocus.mode == NotifyNormal)
{
- #ifdef DEBUG
+ #if defined(DEBUG) || defined(DEBUG_AUTOGRAB)
fprintf(stderr, "%s: (FocusIn): grabbing\n", __func__);
#endif
nxagentGrabPointerAndKeyboard(NULL);
}
/* else
{
- #ifdef DEBUG
+ #if defined(DEBUG) || defined(DEBUG_AUTOGRAB)
fprintf(stderr, "%s: (FocusIn): ungrabbing\n", __func__);
#endif
nxagentUngrabPointerAndKeyboard(NULL);
@@ -1706,7 +1715,7 @@ FIXME: Don't enqueue the KeyRelease event if the key was
XGetInputFocus(nxagentDisplay, &w, &revert_to);
if (w != nxagentDefaultWindows[0] && X.xfocus.mode == NotifyWhileGrabbed)
{
- #ifdef DEBUG
+ #if defined(DEBUG) || defined(DEBUG_AUTOGRAB)
fprintf(stderr, "%s: (FocusOut): ungrabbing\n", __func__);
#endif
nxagentUngrabPointerAndKeyboard(NULL);