Commit 06c83be7 authored by Ulrich Sibiller's avatar Ulrich Sibiller

Keystroke.c: handle parsing state in parse_keystroke_file()

parent 7804c9c6
...@@ -249,6 +249,11 @@ static void parse_keystroke_file(void) ...@@ -249,6 +249,11 @@ static void parse_keystroke_file(void)
char *homefile = "/.nx/config/keystrokes.cfg"; char *homefile = "/.nx/config/keystrokes.cfg";
char *etcfile = "/etc/nxagent/keystrokes.cfg"; char *etcfile = "/etc/nxagent/keystrokes.cfg";
if (nxagentKeystrokeFileParsed)
return;
nxagentKeystrokeFileParsed = True;
if (nxagentX2go) { if (nxagentX2go) {
homefile = "/.x2go/config/keystrokes.cfg"; homefile = "/.x2go/config/keystrokes.cfg";
etcfile = "/etc/x2go/keystrokes.cfg"; etcfile = "/etc/x2go/keystrokes.cfg";
...@@ -390,11 +395,7 @@ static enum nxagentSpecialKeystroke find_keystroke(XKeyEvent *X) ...@@ -390,11 +395,7 @@ static enum nxagentSpecialKeystroke find_keystroke(XKeyEvent *X)
struct nxagentSpecialKeystrokeMap *cur = map; struct nxagentSpecialKeystrokeMap *cur = map;
if (! nxagentKeystrokeFileParsed)
{
parse_keystroke_file(); parse_keystroke_file();
nxagentKeystrokeFileParsed = True;
}
enum nxagentSpecialKeystroke ret = KEYSTROKE_NOTHING; enum nxagentSpecialKeystroke ret = KEYSTROKE_NOTHING;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment