diff options
author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2012-01-16 22:29:05 +0100 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2012-01-16 22:29:05 +0100 |
commit | e9241fe8c730aa7f0b95b15b34ed5c2bda18b5ad (patch) | |
tree | 2dabac3d6b000def9e33cf30137da4507c19951d /debian/patches/105_nxagent_export-remote-keyboard-config.patch | |
parent | d7ecf7214f0df5cd7957264be5249f4cd39f4e6e (diff) | |
download | nx-libs-e9241fe8c730aa7f0b95b15b34ed5c2bda18b5ad.tar.gz nx-libs-e9241fe8c730aa7f0b95b15b34ed5c2bda18b5ad.tar.bz2 nx-libs-e9241fe8c730aa7f0b95b15b34ed5c2bda18b5ad.zip |
Reorganize patch names, to reflect patch inclusion into lite+full or full-only ,,NX (redistributed)'' tarball.
Diffstat (limited to 'debian/patches/105_nxagent_export-remote-keyboard-config.patch')
-rw-r--r-- | debian/patches/105_nxagent_export-remote-keyboard-config.patch | 81 |
1 files changed, 0 insertions, 81 deletions
diff --git a/debian/patches/105_nxagent_export-remote-keyboard-config.patch b/debian/patches/105_nxagent_export-remote-keyboard-config.patch deleted file mode 100644 index 2ea3a2c1f..000000000 --- a/debian/patches/105_nxagent_export-remote-keyboard-config.patch +++ /dev/null @@ -1,81 +0,0 @@ -Description: Export remote keyboard configuration to session directory - Let nxagent write the keyboard configuration to <session_directory>/keyboard - and make it available within the NX session. - . - Originally contributed by Marcelo Boveto Shima <marceloshima@gmail.com>. -Forwarded: pending... -Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> -Last-Update: 2011-12-31 ---- a/nx-X11/programs/Xserver/hw/nxagent/Error.c -+++ b/nx-X11/programs/Xserver/hw/nxagent/Error.c -@@ -497,7 +497,7 @@ - return rootPath; - } - --char *nxagentGetSessionPath() -+char *nxagentGetSessionPath(void) - { - - char *rootPath; ---- a/nx-X11/programs/Xserver/hw/nxagent/Error.h -+++ b/nx-X11/programs/Xserver/hw/nxagent/Error.h -@@ -34,4 +34,6 @@ - - void nxagentEndRedirectToClientsLog(void); - -+char *nxagentGetSessionPath(void); -+ - #endif /* __Error_H__ */ ---- a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c -+++ b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c -@@ -52,6 +52,7 @@ - #include "Keyboard.h" - #include "Events.h" - #include "Options.h" -+#include "Error.h" - - #include "NXlib.h" - -@@ -1790,6 +1791,42 @@ - } - #endif - -+ if (drulesLen != 0) -+ { -+ char *sessionpath = nxagentGetSessionPath(); -+ if (sessionpath != NULL){ -+ int keyboard_file_path_size = strlen(sessionpath) + strlen("/keyboard"); -+ char *keyboard_file_path = malloc((keyboard_file_path_size + 1) * sizeof(char)); -+ FILE *keyboard_file; -+ if ( keyboard_file_path == NULL) -+ { -+ FatalError("nxagentKeyboardProc: malloc failed."); -+ } -+ strcpy(keyboard_file_path, sessionpath); -+ strcat(keyboard_file_path, "/keyboard"); -+ if ((keyboard_file = fopen(keyboard_file_path, "w")) != NULL) { -+ if ( drules != NULL ) -+ fprintf(keyboard_file, "rules=%s\n", drules); -+ if ( dmodel != NULL ) -+ fprintf(keyboard_file, "model=%s\n", dmodel); -+ if ( dlayout != NULL ) -+ fprintf(keyboard_file, "layout=%s\n", dlayout); -+ if ( dvariant != NULL ) -+ fprintf(keyboard_file, "variant=%s\n", dvariant); -+ if ( doptions != NULL ) -+ fprintf(keyboard_file, "options=%s\n", doptions); -+ fclose(keyboard_file); -+ } -+ free(keyboard_file_path); -+ fprintf(stderr, "keyboard file created\n"); -+ } -+ fprintf(stderr, "SessionPath not defined\n"); -+ } -+ else -+ { -+ fprintf(stderr, "Failed to create the keyboard file\n"); -+ } -+ - if (nxagentOption(ClientOs) == ClientOsLinux && - drules != NULL && dmodel != NULL && - (strcmp(drules, "evdev") == 0 || |