From 9ee3a2047ff1b61412303c80cca7991063a10724 Mon Sep 17 00:00:00 2001 From: Ulrich Sibiller Date: Sun, 1 Sep 2019 15:47:03 +0200 Subject: [PATCH] nxagent: move atom initiatialization to Init.c is not dependent on any root window and need only be called once on startup. --- nx-X11/programs/Xserver/hw/nxagent/Atoms.c | 2 +- nx-X11/programs/Xserver/hw/nxagent/Atoms.h | 2 +- nx-X11/programs/Xserver/hw/nxagent/Init.c | 3 +++ nx-X11/programs/Xserver/hw/nxagent/NXwindow.c | 2 -- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Atoms.c b/nx-X11/programs/Xserver/hw/nxagent/Atoms.c index 2ee67b9bb1..a6b38de27e 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Atoms.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Atoms.c @@ -176,7 +176,7 @@ void nxagentWMDetect() finishWMDetection(verbose); } -int nxagentInitAtoms(WindowPtr pWin) +int nxagentInitAtoms(void) { Atom atom; diff --git a/nx-X11/programs/Xserver/hw/nxagent/Atoms.h b/nx-X11/programs/Xserver/hw/nxagent/Atoms.h index 391e061811..07d3a9b8a0 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Atoms.h +++ b/nx-X11/programs/Xserver/hw/nxagent/Atoms.h @@ -41,7 +41,7 @@ extern Bool nxagentWMIsRunning; * to the agent server. */ -int nxagentInitAtoms(WindowPtr pWin); +int nxagentInitAtoms(void); /* * Query and create all the required atoms diff --git a/nx-X11/programs/Xserver/hw/nxagent/Init.c b/nx-X11/programs/Xserver/hw/nxagent/Init.c index 2a0bceaf51..bac64224bd 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 #include "compext/Compext.h" @@ -421,6 +422,8 @@ FIXME: These variables, if not removed at all because have probably #ifdef NXAGENT_CLIPBOARD AddCallback(&SelectionCallback, nxagentSetSelectionCallback, NULL); #endif + + nxagentInitAtoms(); } void diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXwindow.c b/nx-X11/programs/Xserver/hw/nxagent/NXwindow.c index 9d6afa4eb9..f88102d73b 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXwindow.c +++ b/nx-X11/programs/Xserver/hw/nxagent/NXwindow.c @@ -167,8 +167,6 @@ InitRootWindow(WindowPtr pWin) fprintf(stderr, "InitRootWindow: Mapping default windows.\n"); #endif - nxagentInitAtoms(pWin); - nxagentInitClipboard(pWin); nxagentMapDefaultWindows();