[X2Go-Commits] [nx-libs] 30/51: nxagent: simplify keycode conversion setup
git-admin at x2go.org
git-admin at x2go.org
Fri Feb 8 05:40:11 CET 2019
This is an automated email from the git hooks/post-receive script.
x2go pushed a commit to branch master
in repository nx-libs.
commit d5c9733b24a55acb812a4cb11f39551c766c17d7
Author: Ulrich Sibiller <uli42 at gmx.de>
Date: Mon Dec 3 22:03:58 2018 +0100
nxagent: simplify keycode conversion setup
---
nx-X11/programs/Xserver/hw/nxagent/Keyboard.c | 19 +++++--------------
nx-X11/programs/Xserver/hw/nxagent/Keyboard.h | 2 +-
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 20b68b5..5c35d71 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 b6ec51e..dbfb477 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 bd4fccd..91445a3 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;
--
Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
More information about the x2go-commits
mailing list