aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Sibiller <uli42@gmx.de>2020-02-17 14:36:11 +0100
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2020-05-07 14:57:22 +0200
commit7358581d7726c132a2c0b0d80b1e12b282b0aca3 (patch)
tree21cdf8f7aba3193468e30f2a5d901b5abbcece9e
parent067031a3b3036670ccc858be732264215a7d14ba (diff)
downloadnx-libs-7358581d7726c132a2c0b0d80b1e12b282b0aca3.tar.gz
nx-libs-7358581d7726c132a2c0b0d80b1e12b282b0aca3.tar.bz2
nx-libs-7358581d7726c132a2c0b0d80b1e12b282b0aca3.zip
NXdispatch.c: move nxagentClearClipboard to client callback
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Client.c2
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c15
2 files changed, 5 insertions, 12 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Client.c b/nx-X11/programs/Xserver/hw/nxagent/Client.c
index 020f90c91..78b9d46ec 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Client.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Client.c
@@ -52,6 +52,7 @@
#include "Events.h"
#include "Drawable.h"
#include "Utils.h"
+#include "Clipboard.h"
/*
* Need to include this after the stub definition of GC in Agent.h.
@@ -150,6 +151,7 @@ void nxagentClientStateCallback(CallbackListPtr *callbacks, void *data, void *ar
}
case ClientStateGone:
{
+ nxagentClearClipboard(client, NULL);
freeClientPrivates(client);
break;
}
diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c b/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c
index 58dd71f60..8d0fa7549 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c
@@ -989,23 +989,14 @@ CloseDownClient(register ClientPtr client)
{
#ifdef NXAGENT_SERVER
/*
- * There must be a better way to hook a
- * call-back function to be called any
- * time a client is going to be closed.
- */
-
- nxagentClearClipboard(client, NULL);
-
- /*
- * Need to reset the karma counter and
- * get rid of the pending sync replies.
+ * Need to reset the karma counter and get rid of the pending sync
+ * replies.
*/
nxagentWakeupByReset(client);
/*
- * Check if the client
- * is a shadow nxagent.
+ * Check if the client is a shadow nxagent.
*/
nxagentCheckIfShadowAgent(client);