diff options
author | Ulrich Sibiller <uli42@gmx.de> | 2018-12-03 22:03:58 +0100 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2018-12-19 12:32:03 +0100 |
commit | d5c9733b24a55acb812a4cb11f39551c766c17d7 (patch) | |
tree | 4e58a68e6e674222f460025458cd88365c745f06 | |
parent | 1d6c241d3c0b10db19476b3f018cc24f2024fa30 (diff) | |
download | nx-libs-d5c9733b24a55acb812a4cb11f39551c766c17d7.tar.gz nx-libs-d5c9733b24a55acb812a4cb11f39551c766c17d7.tar.bz2 nx-libs-d5c9733b24a55acb812a4cb11f39551c766c17d7.zip |
nxagent: simplify keycode conversion setup
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/Keyboard.c | 19 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/Keyboard.h | 2 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/Reconnect.c | 2 |
3 files changed, 7 insertions, 16 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c index 20b68b563..5c35d7124 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c @@ -1691,10 +1691,14 @@ void nxagentWriteKeyboardFile(char *rules, char *model, char *layout, char *vari void nxagentKeycodeConversionSetup(void) { + nxagentKeycodeConversion = False; + + if (nxagentXkbInfo.Opcode == -1) + return; + if (nxagentOption(KeycodeConversion) == KeycodeConversionOff) { fprintf(stderr, "Info: Keycode conversion is off\n"); - nxagentKeycodeConversion = False; } else if (nxagentOption(KeycodeConversion) == KeycodeConversionOn) { @@ -1721,23 +1725,10 @@ void nxagentKeycodeConversionSetup(void) #endif fprintf(stderr, "Info: Keycode conversion auto-determined as off\n"); - nxagentKeycodeConversion = False; } } } -void nxagentResetKeycodeConversion(void) -{ - if (nxagentXkbInfo.Opcode != -1) - { - nxagentKeycodeConversionSetup(); - } - else - { - nxagentKeycodeConversion = False; - } -} - Bool nxagentGetRemoteXkbExtension(void) { Bool result; diff --git a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.h b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.h index b6ec51e99..dbfb47733 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.h +++ b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.h @@ -117,7 +117,7 @@ void nxagentEnableXkbExtension(void); void nxagentTuneXkbWrapper(void); -void nxagentResetKeycodeConversion(void); +void nxagentKeycodeConversionSetup(void); Bool nxagentGetRemoteXkbExtension(void); #endif diff --git a/nx-X11/programs/Xserver/hw/nxagent/Reconnect.c b/nx-X11/programs/Xserver/hw/nxagent/Reconnect.c index bd4fccdce..91445a383 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Reconnect.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Reconnect.c @@ -620,7 +620,7 @@ Bool nxagentReconnectSession(void) } else { - nxagentResetKeycodeConversion(); + nxagentKeycodeConversionSetup(); } nxagentXkbState.Initialized = 0; |