diff options
author | Ulrich Sibiller <uli42@gmx.de> | 2016-10-25 22:53:39 +0200 |
---|---|---|
committer | Ulrich Sibiller <uli42@gmx.de> | 2016-11-08 07:33:48 +0100 |
commit | b5cc3c94ed0de2d657edc2e5a95fd10e9db3c0a7 (patch) | |
tree | d2d6ce7bb90bc1faafc5ae9d549a4a9733c6d2f5 | |
parent | 52848b785c3039d6a2b9362f0f1a1bbeee7d1e51 (diff) | |
download | nx-libs-b5cc3c94ed0de2d657edc2e5a95fd10e9db3c0a7.tar.gz nx-libs-b5cc3c94ed0de2d657edc2e5a95fd10e9db3c0a7.tar.bz2 nx-libs-b5cc3c94ed0de2d657edc2e5a95fd10e9db3c0a7.zip |
Keyboard.c: improve keyboard file creation
Fixes ArcticaProject/nx-libs#239
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/Keyboard.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c index 2779e0470..1eca33665 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c @@ -1841,15 +1841,15 @@ void nxagentKeycodeConversionSetup(void) strcat(keyboard_file_path, "/keyboard"); if ((keyboard_file = fopen(keyboard_file_path, "w")) != NULL) { if ( drules != NULL ) - fprintf(keyboard_file, "rules=%s\n", drules); + fprintf(keyboard_file, "rules=\"%s\"\n", drules[0] == '\0' ? "," : drules); if ( dmodel != NULL ) - fprintf(keyboard_file, "model=%s\n", dmodel); + fprintf(keyboard_file, "model=\"%s\"\n", dmodel[0] == '\0' ? "," : dmodel); if ( dlayout != NULL ) - fprintf(keyboard_file, "layout=%s\n", dlayout); + fprintf(keyboard_file, "layout=\"%s\"\n", dlayout[0] == '\0' ? "," : dlayout); if ( dvariant != NULL ) - fprintf(keyboard_file, "variant=%s\n", dvariant); + fprintf(keyboard_file, "variant=\"%s\"\n", dvariant[0] == '\0' ? "," : dvariant); if ( doptions != NULL ) - fprintf(keyboard_file, "options=%s\n", doptions); + fprintf(keyboard_file, "options=\"%s\"\n", doptions[0] == '\0' ? "," : doptions); fclose(keyboard_file); fprintf(stderr, "keyboard file created\n"); } |