aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Sibiller <uli42@gmx.de>2016-10-25 21:40:10 +0200
committerUlrich Sibiller <uli42@gmx.de>2016-11-08 07:33:48 +0100
commit8793e362b686985151d6174ee2f2a8e1bceb9ef5 (patch)
treeccf6bfc28b0c77c34b3d6ca4f5d0fcf339402415
parente3ac55bc2f62d65daaad92d17db399c694394661 (diff)
downloadnx-libs-8793e362b686985151d6174ee2f2a8e1bceb9ef5.tar.gz
nx-libs-8793e362b686985151d6174ee2f2a8e1bceb9ef5.tar.bz2
nx-libs-8793e362b686985151d6174ee2f2a8e1bceb9ef5.zip
Improve DEBUG/TEST output regarding keyboard stuff
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Keyboard.c49
-rw-r--r--nx-X11/programs/Xserver/xkb/ddxLoad.c4
2 files changed, 39 insertions, 14 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c
index 345373650..3bb363b47 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c
@@ -477,6 +477,11 @@ CARD8 nxagentConvertKeycode(CARD8 k)
{
if (nxagentKeycodeConversion != 0)
{
+ #ifdef DEBUG
+ if (k != nxagentConvertedKeycodes[k])
+ fprintf(stderr, "nxagentConvertKeycode: converting keycode [%d] to [%d]\n", k, nxagentConvertedKeycodes[k]);
+ #endif
+
return nxagentConvertedKeycodes[k];
}
else
@@ -501,10 +506,10 @@ static void nxagentCheckXkbBaseDirectory(void)
#ifdef TEST
fprintf(stderr, "nxagentCheckXkbBaseDirectory: "
- "Before calling _NXGetXkbBasePath.\n");
+ "Before calling _NXGetXkbBasePath:\n");
fprintf(stderr, "nxagentCheckXkbBaseDirectory: "
- "XkbBaseDirectory varible [%s].\n",
+ "XkbBaseDirectory variable [%s].\n",
XkbBaseDirectory);
#endif
@@ -512,10 +517,10 @@ static void nxagentCheckXkbBaseDirectory(void)
#ifdef TEST
fprintf(stderr, "nxagentCheckXkbBaseDirectory: "
- "After calling _NXGetXkbBasePath.\n");
+ "After calling _NXGetXkbBasePath:\n");
fprintf(stderr, "nxagentCheckXkbBaseDirectory: "
- "XkbBaseDirectory varible [%s].\n",
+ "XkbBaseDirectory variable [%s].\n",
XkbBaseDirectory);
#endif
@@ -877,6 +882,10 @@ XkbError:
fprintf(stderr, "nxagentKeyboardProc: Using XKB extension.\n");
#endif
+ #ifdef TEST
+ fprintf(stderr, "nxagentKeyboardProc: nxagentKeyboard is [%s].\n", nxagentKeyboard ? nxagentKeyboard : "NULL");
+ #endif
+
memset(&names, 0, sizeof(XkbComponentNamesRec));
rules = nxagentXkbGetRules();
@@ -988,6 +997,11 @@ XkbError:
}
fprintf(stderr, "nxagentKeyboardProc: Going to set rules and init device.\n");
#endif
+ #ifdef DEBUG
+ fprintf(stderr, "nxagentKeyboardProc: Going to set rules and init device: "
+ "[rules='%s',model='%s',layout='%s',variants='%s',options='%s'].\n",
+ rules, model, layout, variants, options);
+ #endif
XkbSetRulesDflts(rules, model, layout, variants, options);
XkbInitKeyboardDeviceStruct((void *)pDev, &names, &keySyms, modmap,
@@ -1072,12 +1086,13 @@ XkbError:
else
{
#ifdef TEST
- fprintf(stderr, "nxagentKeyboardProc: No config file.\n");
- #endif
-
- #ifdef TEST
fprintf(stderr, "nxagentKeyboardProc: No config file, going to set rules and init device.\n");
#endif
+ #ifdef DEBUG
+ fprintf(stderr, "nxagentKeyboardProc: Going to set rules and init device: "
+ "[rules='%s',model='%s',layout='%s',variants='%s',options='%s'].\n",
+ rules, model, layout, variants, options);
+ #endif
XkbSetRulesDflts(rules, model, layout, variants, options);
XkbInitKeyboardDeviceStruct((void *)pDev, &names, &keySyms, modmap,
@@ -1097,6 +1112,11 @@ XkbError:
#ifdef TEST
fprintf(stderr, "nxagentKeyboardProc: Going to set rules and init device.\n");
#endif
+ #ifdef DEBUG
+ fprintf(stderr, "nxagentKeyboardProc: Going to set rules and init device: "
+ "[rules='%s',model='%s',layout='%s',variants='%s',options='%s'].\n",
+ rules, model, layout, variants, options);
+ #endif
XkbSetRulesDflts(rules, model, layout, variants, options);
XkbInitKeyboardDeviceStruct((void *)pDev, &names, &keySyms, modmap,
@@ -1402,8 +1422,8 @@ void nxagentCheckRemoteKeycodes()
nxagentNumLockKeycode = XKeysymToKeycode(nxagentDisplay, XK_Num_Lock);
#ifdef DEBUG
- fprintf(stderr, "nxagentCheckRemoteKeycodes: Remote CapsLock keycode "
- "is [%d] NumLock [%d].\n", nxagentCapsLockKeycode,
+ fprintf(stderr, "nxagentCheckRemoteKeycodes: Remote keycodes: CapsLock "
+ "[%d] NumLock [%d].\n", nxagentCapsLockKeycode,
nxagentNumLockKeycode);
#endif
}
@@ -1805,8 +1825,8 @@ void nxagentKeycodeConversionSetup(void)
if (drulesLen != 0 && drules != NULL && dmodel != NULL)
{
fprintf(stderr, "nxagentKeycodeConversionSetup: "
- "Remote: [%s,%s,%s,%s,%s].\n", drules, dmodel, dlayout,
- dvariant, doptions);
+ "Remote: [rules='%s',model='%s',layout='%s',variant='%s',options='%s'].\n",
+ drules, dmodel, dlayout, dvariant, doptions);
}
else
{
@@ -1862,6 +1882,11 @@ void nxagentKeycodeConversionSetup(void)
(strcmp(drules, "evdev") == 0 ||
strcmp(dmodel, "evdev") == 0))
{
+ #ifdef DEBUG
+ fprintf(stderr, "nxagentKeycodeConversionSetup: "
+ "Activating KeyCode conversion.\n");
+ #endif
+
nxagentKeycodeConversion = 1;
}
diff --git a/nx-X11/programs/Xserver/xkb/ddxLoad.c b/nx-X11/programs/Xserver/xkb/ddxLoad.c
index dab94660d..d1fc87d3a 100644
--- a/nx-X11/programs/Xserver/xkb/ddxLoad.c
+++ b/nx-X11/programs/Xserver/xkb/ddxLoad.c
@@ -223,8 +223,8 @@ static int NXVerifyXkbBaseDirectory(const char *dirPath)
{
#ifdef TEST
- fprintf(stderr, "NXVerifyXkbBaseDirectory: Can't find the keymap.dir file [%s].\n",
- rulesBaseFilePath);
+ fprintf(stderr, "NXVerifyXkbBaseDirectory: Xkb Base Directory [%s] is not valid (can't find file [%s]).\n",
+ dirPath, rulesBaseFilePath);
#endif
free(rulesBaseFilePath);