From 8f2679abc6910155fa2e5ddeb54cd7cfd4dcf17f Mon Sep 17 00:00:00 2001 From: Ulrich Sibiller Date: Mon, 13 Mar 2017 21:14:20 +0100 Subject: Keystroke.c: make nxagentKeystrokeFileParsed local --- nx-X11/programs/Xserver/hw/nxagent/Keystroke.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'nx-X11') diff --git a/nx-X11/programs/Xserver/hw/nxagent/Keystroke.c b/nx-X11/programs/Xserver/hw/nxagent/Keystroke.c index 55936db6d..f655e3b95 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Keystroke.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Keystroke.c @@ -45,7 +45,6 @@ extern Bool nxagentWMIsRunning; extern Bool nxagentIpaq; extern char *nxagentKeystrokeFile; -Bool nxagentKeystrokeFileParsed = False; #ifdef NX_DEBUG_INPUT int nxagentDebugInputDevices = 0; @@ -254,10 +253,12 @@ static void parse_keystroke_file(void) char *homefile = "/.nx/config/keystrokes.cfg"; char *etcfile = "/etc/nxagent/keystrokes.cfg"; - if (nxagentKeystrokeFileParsed) + /* used for tracking if the config file parsing has already been + done (regardless of the result) */ + static Bool done = False; + if (done) return; - - nxagentKeystrokeFileParsed = True; + done = True; if (nxagentX2go) { homefile = "/.x2go/config/keystrokes.cfg"; -- cgit v1.2.3