aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs
diff options
context:
space:
mode:
authorUlrich Sibiller <uli42@gmx.de>2017-03-10 22:58:27 +0100
committerUlrich Sibiller <uli42@gmx.de>2017-03-13 21:24:46 +0100
commit06c83be7e3b65a43ce78776f205d3589cb18852b (patch)
treefd16ca54c597a89c6e8df322b001d72579b55d6e /nx-X11/programs
parent7804c9c697b6aab9a984deb370eda69884eecd64 (diff)
downloadnx-libs-06c83be7e3b65a43ce78776f205d3589cb18852b.tar.gz
nx-libs-06c83be7e3b65a43ce78776f205d3589cb18852b.tar.bz2
nx-libs-06c83be7e3b65a43ce78776f205d3589cb18852b.zip
Keystroke.c: handle parsing state in parse_keystroke_file()
Diffstat (limited to 'nx-X11/programs')
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Keystroke.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Keystroke.c b/nx-X11/programs/Xserver/hw/nxagent/Keystroke.c
index 7148cadf0..28d6d2467 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Keystroke.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Keystroke.c
@@ -249,6 +249,11 @@ static void parse_keystroke_file(void)
char *homefile = "/.nx/config/keystrokes.cfg";
char *etcfile = "/etc/nxagent/keystrokes.cfg";
+ if (nxagentKeystrokeFileParsed)
+ return;
+
+ nxagentKeystrokeFileParsed = True;
+
if (nxagentX2go) {
homefile = "/.x2go/config/keystrokes.cfg";
etcfile = "/etc/x2go/keystrokes.cfg";
@@ -390,11 +395,7 @@ static enum nxagentSpecialKeystroke find_keystroke(XKeyEvent *X)
struct nxagentSpecialKeystrokeMap *cur = map;
- if (! nxagentKeystrokeFileParsed)
- {
- parse_keystroke_file();
- nxagentKeystrokeFileParsed = True;
- }
+ parse_keystroke_file();
enum nxagentSpecialKeystroke ret = KEYSTROKE_NOTHING;