diff options
author | Ulrich Sibiller <uli42@gmx.de> | 2020-02-17 14:45:54 +0100 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2020-05-07 14:57:22 +0200 |
commit | 8e1d97732bc889659209406e99360972e2efb73d (patch) | |
tree | 47bc9dcfe517f82a2ef94bc63c7247bf4057cd45 | |
parent | 7358581d7726c132a2c0b0d80b1e12b282b0aca3 (diff) | |
download | nx-libs-8e1d97732bc889659209406e99360972e2efb73d.tar.gz nx-libs-8e1d97732bc889659209406e99360972e2efb73d.tar.bz2 nx-libs-8e1d97732bc889659209406e99360972e2efb73d.zip |
NXdispatch.c: move nxagentCheckIfShadowAgent to client callback
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/Client.c | 9 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/Client.h | 14 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c | 7 |
3 files changed, 12 insertions, 18 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Client.c b/nx-X11/programs/Xserver/hw/nxagent/Client.c index 78b9d46ec..9b0f2c5e6 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Client.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Client.c @@ -72,6 +72,7 @@ void nxagentClientStateCallback(CallbackListPtr *callbacks, void *data, void *args); static void initClientPrivates(ClientPtr client); static void freeClientPrivates(ClientPtr client); +static void checkIfShadowAgent(ClientPtr client); /* * Returns the last signal delivered to the process. @@ -152,6 +153,12 @@ void nxagentClientStateCallback(CallbackListPtr *callbacks, void *data, void *ar case ClientStateGone: { nxagentClearClipboard(client, NULL); + + /* + * Check if the client is a shadow nxagent. + */ + checkIfShadowAgent(client); + freeClientPrivates(client); break; } @@ -283,7 +290,7 @@ void nxagentGuessShadowHint(ClientPtr client, Atom property) } } -void nxagentCheckIfShadowAgent(ClientPtr client) +static void checkIfShadowAgent(ClientPtr client) { if (nxagentClientHint(client) == NXAGENT_SHADOW) { diff --git a/nx-X11/programs/Xserver/hw/nxagent/Client.h b/nx-X11/programs/Xserver/hw/nxagent/Client.h index 2115e6b6d..38a02aed1 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Client.h +++ b/nx-X11/programs/Xserver/hw/nxagent/Client.h @@ -76,8 +76,7 @@ extern void nxagentClientStateCallback(CallbackListPtr *callbacks, void *data, v (nxagentClientHint(pClient) == NXCLIENT_DIALOG) /* - * The actual reason why the client - * is sleeping. + * The actual reason why the client is sleeping. */ #define SleepingBySplit 1 @@ -94,19 +93,15 @@ void nxagentGuessClientHint(ClientPtr, Atom, char*); void nxagentGuessShadowHint(ClientPtr, Atom); -void nxagentCheckIfShadowAgent(ClientPtr); - /* - * Suspend or restart the agent's - * client. + * Suspend or restart the agent's client. */ int nxagentSuspendBySplit(ClientPtr client); int nxagentWakeupBySplit(ClientPtr client); /* - * Wait until the given client is - * restarted. + * Wait until the given client is restarted. */ void nxagentWaitWakeupBySplit(ClientPtr client); @@ -123,8 +118,7 @@ void nxagentWaitDrawable(DrawablePtr pDrawable); void nxagentWakeupByReconnect(void); /* - * Reset the client state before - * closing it down. + * Reset the client state before closing it down. */ void nxagentWakeupByReset(ClientPtr client); diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c b/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c index 8d0fa7549..5315f86bc 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c +++ b/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c @@ -994,13 +994,6 @@ CloseDownClient(register ClientPtr client) */ nxagentWakeupByReset(client); - - /* - * Check if the client is a shadow nxagent. - */ - - nxagentCheckIfShadowAgent(client); - #endif xorg_CloseDownClient(client); |