From bd336c92bf100e037c19f500786a94eac02e2e92 Mon Sep 17 00:00:00 2001 From: Ulrich Sibiller Date: Wed, 30 Dec 2020 22:19:50 +0100 Subject: nxagent: make Desktop, Rootless and Binder options Booleans (again) They have been changed to tri-state variables (1, 0 and UNDEFINED) between nxagent 1.5.0-90 and -93, for no obvious reason. --- nx-X11/programs/Xserver/hw/nxagent/Args.c | 35 ++++++------------------------- 1 file changed, 6 insertions(+), 29 deletions(-) (limited to 'nx-X11/programs/Xserver/hw/nxagent/Args.c') diff --git a/nx-X11/programs/Xserver/hw/nxagent/Args.c b/nx-X11/programs/Xserver/hw/nxagent/Args.c index 76669e39e..52aa055fc 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Args.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Args.c @@ -801,14 +801,9 @@ int ddxProcessArgument(int argc, char *argv[], int i) if (!strcmp(argv[i], "-R")) { - if (nxagentOption(Binder) == UNDEFINED || - nxagentOption(Desktop) == UNDEFINED || - nxagentOption(Rootless) == UNDEFINED) - { - nxagentChangeOption(Binder, False); - nxagentChangeOption(Desktop, False); - nxagentChangeOption(Rootless, True); - } + nxagentChangeOption(Binder, False); + nxagentChangeOption(Desktop, False); + nxagentChangeOption(Rootless, True); return 1; } @@ -1749,13 +1744,14 @@ N/A #endif - if ((nxagentOption(Rootless) == True) && nxagentOption(Fullscreen)) + if (nxagentOption(Rootless) && nxagentOption(Fullscreen)) { #ifdef TEST fprintf(stderr, "WARNING: Ignoring fullscreen option for rootless session.\n"); #endif nxagentChangeOption(Fullscreen, False); + nxagentChangeOption(AllScreens, False); } /* @@ -1970,25 +1966,6 @@ N/A nxagentSetCoalescence(); - /* - * Set the other defaults. - */ - - if (nxagentOption(Binder) == UNDEFINED) - { - nxagentChangeOption(Binder, False); - } - - if (nxagentOption(Rootless) == UNDEFINED) - { - nxagentChangeOption(Rootless, False); - } - - if (nxagentOption(Desktop) == UNDEFINED) - { - nxagentChangeOption(Desktop, True); - } - /* * The enableBackingStore flag is defined * in window.c in the dix. @@ -2029,7 +2006,7 @@ FIXME: In rootless mode the backing-store support is not functional yet. nxagentAlphaEnabled = False; } - if ((nxagentOption(Rootless) == True) && nxagentOption(Xdmcp)) + if (nxagentOption(Rootless) && nxagentOption(Xdmcp)) { FatalError("PANIC! Cannot start a XDMCP session in rootless mode.\n"); } -- cgit v1.2.3