Commit 8e1d9773 authored by Ulrich Sibiller's avatar Ulrich Sibiller Committed by Mike Gabriel

NXdispatch.c: move nxagentCheckIfShadowAgent to client callback

parent 7358581d
...@@ -72,6 +72,7 @@ ...@@ -72,6 +72,7 @@
void nxagentClientStateCallback(CallbackListPtr *callbacks, void *data, void *args); void nxagentClientStateCallback(CallbackListPtr *callbacks, void *data, void *args);
static void initClientPrivates(ClientPtr client); static void initClientPrivates(ClientPtr client);
static void freeClientPrivates(ClientPtr client); static void freeClientPrivates(ClientPtr client);
static void checkIfShadowAgent(ClientPtr client);
/* /*
* Returns the last signal delivered to the process. * Returns the last signal delivered to the process.
...@@ -152,6 +153,12 @@ void nxagentClientStateCallback(CallbackListPtr *callbacks, void *data, void *ar ...@@ -152,6 +153,12 @@ void nxagentClientStateCallback(CallbackListPtr *callbacks, void *data, void *ar
case ClientStateGone: case ClientStateGone:
{ {
nxagentClearClipboard(client, NULL); nxagentClearClipboard(client, NULL);
/*
* Check if the client is a shadow nxagent.
*/
checkIfShadowAgent(client);
freeClientPrivates(client); freeClientPrivates(client);
break; break;
} }
...@@ -283,7 +290,7 @@ void nxagentGuessShadowHint(ClientPtr client, Atom property) ...@@ -283,7 +290,7 @@ void nxagentGuessShadowHint(ClientPtr client, Atom property)
} }
} }
void nxagentCheckIfShadowAgent(ClientPtr client) static void checkIfShadowAgent(ClientPtr client)
{ {
if (nxagentClientHint(client) == NXAGENT_SHADOW) if (nxagentClientHint(client) == NXAGENT_SHADOW)
{ {
......
...@@ -76,8 +76,7 @@ extern void nxagentClientStateCallback(CallbackListPtr *callbacks, void *data, v ...@@ -76,8 +76,7 @@ extern void nxagentClientStateCallback(CallbackListPtr *callbacks, void *data, v
(nxagentClientHint(pClient) == NXCLIENT_DIALOG) (nxagentClientHint(pClient) == NXCLIENT_DIALOG)
/* /*
* The actual reason why the client * The actual reason why the client is sleeping.
* is sleeping.
*/ */
#define SleepingBySplit 1 #define SleepingBySplit 1
...@@ -94,19 +93,15 @@ void nxagentGuessClientHint(ClientPtr, Atom, char*); ...@@ -94,19 +93,15 @@ void nxagentGuessClientHint(ClientPtr, Atom, char*);
void nxagentGuessShadowHint(ClientPtr, Atom); void nxagentGuessShadowHint(ClientPtr, Atom);
void nxagentCheckIfShadowAgent(ClientPtr);
/* /*
* Suspend or restart the agent's * Suspend or restart the agent's client.
* client.
*/ */
int nxagentSuspendBySplit(ClientPtr client); int nxagentSuspendBySplit(ClientPtr client);
int nxagentWakeupBySplit(ClientPtr client); int nxagentWakeupBySplit(ClientPtr client);
/* /*
* Wait until the given client is * Wait until the given client is restarted.
* restarted.
*/ */
void nxagentWaitWakeupBySplit(ClientPtr client); void nxagentWaitWakeupBySplit(ClientPtr client);
...@@ -123,8 +118,7 @@ void nxagentWaitDrawable(DrawablePtr pDrawable); ...@@ -123,8 +118,7 @@ void nxagentWaitDrawable(DrawablePtr pDrawable);
void nxagentWakeupByReconnect(void); void nxagentWakeupByReconnect(void);
/* /*
* Reset the client state before * Reset the client state before closing it down.
* closing it down.
*/ */
void nxagentWakeupByReset(ClientPtr client); void nxagentWakeupByReset(ClientPtr client);
......
...@@ -994,13 +994,6 @@ CloseDownClient(register ClientPtr client) ...@@ -994,13 +994,6 @@ CloseDownClient(register ClientPtr client)
*/ */
nxagentWakeupByReset(client); nxagentWakeupByReset(client);
/*
* Check if the client is a shadow nxagent.
*/
nxagentCheckIfShadowAgent(client);
#endif #endif
xorg_CloseDownClient(client); xorg_CloseDownClient(client);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment