diff options
author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2019-09-29 17:39:48 +0200 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2019-09-29 17:39:48 +0200 |
commit | 3a3a3373c36b5af6208ee5fdfe25e64b5766b75a (patch) | |
tree | 619edfb91b22fe9e604b115b6f88616e942709f9 /nx-X11/programs/Xserver/hw/nxagent/Init.c | |
parent | 796c8e421fd9df658fd5b324fcaa5182566e6905 (diff) | |
parent | 085f8a4f672ed3e167bdd7791835f7ab2bebb723 (diff) | |
download | nx-libs-3a3a3373c36b5af6208ee5fdfe25e64b5766b75a.tar.gz nx-libs-3a3a3373c36b5af6208ee5fdfe25e64b5766b75a.tar.bz2 nx-libs-3a3a3373c36b5af6208ee5fdfe25e64b5766b75a.zip |
Merge branch 'uli42-pr/various2' into 3.6.x
Attributes GH PR #827: https://github.com/ArcticaProject/nx-libs/pull/827
Diffstat (limited to 'nx-X11/programs/Xserver/hw/nxagent/Init.c')
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/Init.c | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Init.c b/nx-X11/programs/Xserver/hw/nxagent/Init.c index 2a0bceaf5..0b4ffd601 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Init.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Init.c @@ -71,6 +71,7 @@ is" without express or implied warranty. #include "Millis.h" #include "Error.h" #include "Keystroke.h" +#include "Atoms.h" #include <nx/NX.h> #include "compext/Compext.h" @@ -148,6 +149,8 @@ extern void nxagentSetSelectionCallback(CallbackListPtr *callbacks, void *data, void *args); #endif +extern const char *nxagentProgName; + void ddxInitGlobals(void) { /* @@ -199,8 +202,6 @@ Bool nxagentX2go; void checkX2goAgent(void) { - extern const char *nxagentProgName; - #ifdef TEST fprintf(stderr, "%s: nxagentProgName [%s]\n", __func__, nxagentProgName); #endif @@ -221,15 +222,6 @@ void checkX2goAgent(void) void InitOutput(ScreenInfo *screenInfo, int argc, char *argv[]) { - char *authority; - int i; - - #ifdef __sun - - char *environment; - - #endif - /* * Print our pid and version information. */ @@ -295,11 +287,13 @@ void InitOutput(ScreenInfo *screenInfo, int argc, char *argv[]) } #endif - if ((authority = getenv("NX_XAUTHORITY"))) + char *authority = getenv("NX_XAUTHORITY"); + + if (authority) { #ifdef __sun - environment = malloc(15 + strlen(authority)); + char *environment = malloc(15 + strlen(authority)); sprintf(environment, "XAUTHORITY=%s", authority); @@ -391,7 +385,7 @@ FIXME: These variables, if not removed at all because have probably nxagentNumScreens = 1; } - for (i = 0; i < nxagentNumScreens; i++) + for (int i = 0; i < nxagentNumScreens; i++) { AddScreen(nxagentOpenScreen, argc, argv); } @@ -421,6 +415,8 @@ FIXME: These variables, if not removed at all because have probably #ifdef NXAGENT_CLIPBOARD AddCallback(&SelectionCallback, nxagentSetSelectionCallback, NULL); #endif + + nxagentInitAtoms(); } void |