diff options
author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2021-10-30 21:20:21 +0200 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2021-10-30 21:20:21 +0200 |
commit | b06b6b1efe84f5759da3cf6f9dfaf1c2c173aeb6 (patch) | |
tree | 0e8497952ce92d8c3f271cd1d6a04832b35d1b36 /nx-X11/programs/Xserver/hw/nxagent | |
parent | 1ef24c379f8d142180f77ecfe2ab43093c3b7a64 (diff) | |
parent | 70fde4c748a0466343d308c79ecd4853499b58f1 (diff) | |
download | nx-libs-b06b6b1efe84f5759da3cf6f9dfaf1c2c173aeb6.tar.gz nx-libs-b06b6b1efe84f5759da3cf6f9dfaf1c2c173aeb6.tar.bz2 nx-libs-b06b6b1efe84f5759da3cf6f9dfaf1c2c173aeb6.zip |
Merge branch 'uli42-pr/various8' into 3.6.x
Attributes GH PR #1025: https://github.com/ArcticaProject/nx-libs/pull/1025
Diffstat (limited to 'nx-X11/programs/Xserver/hw/nxagent')
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/Args.c | 11 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/Clipboard.c | 22 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/Imakefile | 55 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/Screen.c | 4 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/Window.c | 2 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/compext/Imakefile | 18 |
6 files changed, 55 insertions, 57 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Args.c b/nx-X11/programs/Xserver/hw/nxagent/Args.c index e2dc8c083..174873e51 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Args.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Args.c @@ -187,9 +187,8 @@ int ddxProcessArgument(int argc, char *argv[], int i) /* * The flavour can never change, so only set it once. * - * FIXME: ddxProcessArgument() is called once for every command line - * argument, with argv[0] being the argument and not the program - * name! We should move this check somewhere else. + * ddxProcessArgument() is called once for every command line + * argument, with argv[i] being the argument, i > 0. argv[0] is the program name. */ if (nxagentProgName == NULL) { @@ -268,7 +267,6 @@ int ddxProcessArgument(int argc, char *argv[], int i) if (envOptions != NULL) { nxagentParseOptionString(envOptions); - SAFE_free(envOptions); } @@ -699,8 +697,6 @@ int ddxProcessArgument(int argc, char *argv[], int i) #ifdef TEST fprintf(stderr, "%s: changing nxagentKeyboard from [null/null] to [clone].\n", __func__); #endif - - SAFE_free(nxagentKeyboard); nxagentKeyboard = strdup("clone"); } else @@ -1154,7 +1150,6 @@ static void nxagentParseSingleOption(char *name, char *value) fprintf(stderr, "Warning: Ignoring bad value '%s' for option 'fullscreen'.\n", validateString(value)); } - return; } else if (!strcmp(name, "shpix")) @@ -1189,7 +1184,6 @@ static void nxagentParseSingleOption(char *name, char *value) fprintf(stderr, "Warning: Ignoring bad value '%s' for option 'shmem'.\n", validateString(value)); } - return; } else if (!strcmp(name, "composite")) @@ -1531,7 +1525,6 @@ static void nxagentParseSingleOption(char *name, char *value) } *argv[0] = '-'; - memcpy(argv[0] + 1, name, size); } diff --git a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c index 72ca6ac64..f0cef595c 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c @@ -1251,10 +1251,12 @@ void nxagentHandleSelectionRequestFromXServer(XEvent *X) if (!nxagentOption(TextClipboard)) { - /* Optimization: if we have a current target cache check if the + /* + * Optimization: if we have a current target cache check if the * requested target is supported by the owner. If not we can take * a shortcut and deny the request immediately without doing any - * further communication. */ + * further communication. + */ if (targetCache[index].type == FOR_REMOTE && targetCache[index].forRemote) { XlibAtom *targets = targetCache[index].forRemote; @@ -1373,7 +1375,7 @@ void nxagentHandleSelectionRequestFromXServer(XEvent *X) } /* - * Selete property before sending the request to the client as + * Delete property before sending the request to the client as * required by ICCCM. */ DeleteProperty(lastSelectionOwner[index].windowPtr, clientCutProperty); @@ -1389,8 +1391,10 @@ void nxagentHandleSelectionRequestFromXServer(XEvent *X) x.u.selectionRequest.requestor, x.u.selectionRequest.selection, NameForLocalAtom(x.u.selectionRequest.selection)); #endif - /* No reply to the Xserver yet - we will do that once the answer - of the above sendEventToClient arrives. */ + /* + * No reply to the Xserver yet - we will do that once the answer + * of the above sendEventToClient arrives. + */ } else { @@ -1492,7 +1496,7 @@ static void transferSelectionFromXServer(int index, int resource) } else { - /* Collect the property and store it with index "resource" */ + /* Collect the property and store it with index "free_resource" */ result = NXCollectProperty(nxagentDisplay, free_resource, serverWindow, @@ -1581,8 +1585,10 @@ static void transferSelectionFromXServer(int index, int resource) setClientSelectionStage(index, SelectionStageWaitData); - /* We've seen situations where you had to move the mouse or press a - key to let the transfer complete. Flushing here fixed it */ + /* + * We've seen situations where you had to move the mouse or press a + * key to let the transfer complete. Flushing here fixed it + */ NXFlushDisplay(nxagentDisplay, NXFlushLink); break; diff --git a/nx-X11/programs/Xserver/hw/nxagent/Imakefile b/nx-X11/programs/Xserver/hw/nxagent/Imakefile index 4e48f62f5..710bfba80 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Imakefile +++ b/nx-X11/programs/Xserver/hw/nxagent/Imakefile @@ -1,10 +1,9 @@ #include <Server.tmpl> - NULL = SUBDIRS = compext \ - $(NULL) + $(NULL) SRCS = \ NXwindow.c \ @@ -17,9 +16,9 @@ SRCS = \ NXglyph.c \ NXpicture.c \ NXshm.c \ - NXglxext.c \ - NXxvdisp.c \ - NXresource.c \ + NXglxext.c \ + NXxvdisp.c \ + NXresource.c \ NXmitrap.c \ Args.c \ Binder.c \ @@ -73,9 +72,9 @@ OBJS = \ NXglyph.o \ NXpicture.o \ NXshm.o \ - NXglxext.o \ - NXxvdisp.o \ - NXresource.o \ + NXglxext.o \ + NXxvdisp.o \ + NXresource.o \ NXmitrap.o \ Args.o \ Binder.o \ @@ -240,26 +239,26 @@ NX_DEFINES = \ #endif DEFINES = \ - -g $(OS_DEFINES) $(EXT_DEFINES) $(NX_DEFINES) \ - -UXF86VIDMODE -UXFreeXDGA -UXF86MISC -UXF86DRI \ - -DNXAGENT_SERVER \ - -DNXAGENT_RENDER_CLEANUP \ - -DNXAGENT_FIXKEYS \ - -DNXAGENT_CLIPBOARD \ - -DNXAGENT_WAKEUP=1000 \ - -DNXAGENT_ONSTART \ - -DNXAGENT_ARTSD \ - -UNX_DEBUG_INPUT \ - -DRANDR_10_INTERFACE=1 \ - -DRANDR_12_INTERFACE=1 \ - -DRANDR_13_INTERFACE=1 \ - -DRANDR_14_INTERFACE=1 \ - -DRANDR_15_INTERFACE=1 \ - -DPANORAMIX \ - -UDEBUG_TREE \ - -DX2GO \ - -DSYSTEMFONTDIR=\"$(SYSTEMFONTDIR)\" \ - $(NULL) + -g $(OS_DEFINES) $(EXT_DEFINES) $(NX_DEFINES) \ + -UXF86VIDMODE -UXFreeXDGA -UXF86MISC -UXF86DRI \ + -DNXAGENT_SERVER \ + -DNXAGENT_RENDER_CLEANUP \ + -DNXAGENT_FIXKEYS \ + -DNXAGENT_CLIPBOARD \ + -DNXAGENT_WAKEUP=1000 \ + -DNXAGENT_ONSTART \ + -DNXAGENT_ARTSD \ + -UNX_DEBUG_INPUT \ + -DRANDR_10_INTERFACE=1 \ + -DRANDR_12_INTERFACE=1 \ + -DRANDR_13_INTERFACE=1 \ + -DRANDR_14_INTERFACE=1 \ + -DRANDR_15_INTERFACE=1 \ + -DPANORAMIX \ + -UDEBUG_TREE \ + -DX2GO \ + -DSYSTEMFONTDIR=\"$(SYSTEMFONTDIR)\" \ + $(NULL) all:: $(OBJS) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Screen.c b/nx-X11/programs/Xserver/hw/nxagent/Screen.c index 31b8b68a3..7998f35f0 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Screen.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Screen.c @@ -375,7 +375,7 @@ FIXME: We'll check for ReparentNotify and LeaveNotify events after XEvent e; #ifdef TEST - fprintf(stderr, "%d: WARNING! Going to wait for the ReparentNotify event [%d].\n", __func__, i); + fprintf(stderr, "%s: WARNING! Going to wait for the ReparentNotify event [%d].\n", __func__, i); #endif if (XCheckTypedWindowEvent(nxagentDisplay, nxagentFullscreenWindow, ReparentNotify, &e)) @@ -988,7 +988,7 @@ Bool nxagentOpenScreen(ScreenPtr pScreen, int argc, char *argv[]) nxagentChangeOption(Fullscreen, False); nxagentChangeOption(AllScreens, False); - nxagentFullscreenWindow = 0; + nxagentFullscreenWindow = None; resetAgentPosition = True; } diff --git a/nx-X11/programs/Xserver/hw/nxagent/Window.c b/nx-X11/programs/Xserver/hw/nxagent/Window.c index 6f98ee57b..b2560a660 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Window.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Window.c @@ -2579,7 +2579,7 @@ void nxagentMapDefaultWindows(void) * Ensure that the fullscreen window gets the focus. */ - if (nxagentFullscreenWindow != 0) + if (nxagentFullscreenWindow != None) { XSetInputFocus(nxagentDisplay, nxagentFullscreenWindow, RevertToParent, CurrentTime); diff --git a/nx-X11/programs/Xserver/hw/nxagent/compext/Imakefile b/nx-X11/programs/Xserver/hw/nxagent/compext/Imakefile index 407baab80..ea34def78 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/compext/Imakefile +++ b/nx-X11/programs/Xserver/hw/nxagent/compext/Imakefile @@ -30,16 +30,16 @@ OBJS = \ Z.o \ $(NULL) - INCLUDES = -I$(SERVERSRC)/include \ - -I$(XBUILDINCDIR) \ - -I../../../../../lib/include/X11 \ - `pkg-config --cflags-only-I pixman-1` \ - $$(pkg-config --exists 'zlib' >/dev/null 2>&1 && pkg-config --cflags-only-I 'zlib') \ - `pkg-config --cflags-only-I libpng` \ - $(NULL) +INCLUDES = -I$(SERVERSRC)/include \ + -I$(XBUILDINCDIR) \ + -I../../../../../lib/include/X11 \ + `pkg-config --cflags-only-I pixman-1` \ + $$(pkg-config --exists 'zlib' >/dev/null 2>&1 && pkg-config --cflags-only-I 'zlib') \ + `pkg-config --cflags-only-I libpng` \ + $(NULL) - LINTLIBS = $(SERVERSRC)/dix/llib-ldix.ln \ - $(NULL) +LINTLIBS = $(SERVERSRC)/dix/llib-ldix.ln \ + $(NULL) NormalLibraryObjectRule() NormalLibraryTarget(compext,$(OBJS)) |