aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c
diff options
context:
space:
mode:
authorOleksandr Shneyder <oleksandr.shneyder@obviously-nice.de>2015-02-13 13:57:39 +0100
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2015-02-13 13:57:39 +0100
commit1fd8551f1632efbc2655c9293087bba08cf2f0c9 (patch)
treeb94599ab851a7cb9078d0a21e5170ff12d3b44ff /nx-X11/programs/Xserver/hw/nxagent/Keyboard.c
parent23fb617551f7d89dbc1fc9e216b7f12d2936e1a2 (diff)
downloadnx-libs-1fd8551f1632efbc2655c9293087bba08cf2f0c9.tar.gz
nx-libs-1fd8551f1632efbc2655c9293087bba08cf2f0c9.tar.bz2
nx-libs-1fd8551f1632efbc2655c9293087bba08cf2f0c9.zip
Unbrand NX Agent Startup Screen / Brand X2Go Agent Startup Screen (999_nxagent_unbrand-nxagent-brand-x2goagent.full.patch).
When launched with NX Agent flavour, the startup screen gets unbranded by this patch (the !M logo does not get shown). When launched with X2Go Agent flavour, the startup screen gets branded with the X2GO logo.
Diffstat (limited to 'nx-X11/programs/Xserver/hw/nxagent/Keyboard.c')
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Keyboard.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c
index 1637f0c4c..a51d19e81 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c
@@ -62,6 +62,7 @@ is" without express or implied warranty.
#include "globals.h"
#include "property.h"
+#include "Init.h"
#include <X11/extensions/XKB.h>
@@ -138,8 +139,11 @@ extern Status XkbGetControls(
#ifndef XKB_ALTERNATE_BASE_DIRECTORY
#define XKB_ALTERNATE_BASE_DIRECTORY "/usr/X11R6/lib/X11/xkb"
#endif
-#ifndef XKB_CONFIG_FILE
-#define XKB_CONFIG_FILE "/etc/nxagent/nxagent.keyboard"
+#ifndef XKB_CONFIG_FILE_NX
+#define XKB_CONFIG_FILE_NX "/etc/nxagent/nxagent.keyboard"
+#endif
+#ifndef XKB_CONFIG_FILE_X2GO
+#define XKB_CONFIG_FILE_X2GO "/etc/x2go/x2goagent.keyboard"
#endif
#ifndef XKB_DFLT_RULES_FILE
#define XKB_DFLT_RULES_FILE "xfree86"
@@ -988,7 +992,10 @@ XkbError:
XkbGetControls(nxagentDisplay, XkbAllControlsMask, xkb);
- nxagentXkbConfigFilePathSize = strlen(XKB_CONFIG_FILE);
+ if (nxagentX2go)
+ nxagentXkbConfigFilePathSize = strlen(XKB_CONFIG_FILE_X2GO);
+ else
+ nxagentXkbConfigFilePathSize = strlen(XKB_CONFIG_FILE_NX);
nxagentXkbConfigFilePath = malloc((nxagentXkbConfigFilePathSize + 1) * sizeof(char));
@@ -997,7 +1004,10 @@ XkbError:
FatalError("nxagentKeyboardProc: malloc failed.");
}
- strcpy(nxagentXkbConfigFilePath, XKB_CONFIG_FILE);
+ if (nxagentX2go)
+ nxagentXkbConfigFilePathSize = strlen(XKB_CONFIG_FILE_X2GO);
+ else
+ nxagentXkbConfigFilePathSize = strlen(XKB_CONFIG_FILE_NX);
#ifdef TEST
fprintf(stderr, "nxagentKeyboardProc: nxagentXkbConfigFilePath [%s].\n",