aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs
diff options
context:
space:
mode:
authorUlrich Sibiller <uli42@gmx.de>2019-08-05 17:14:06 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2019-09-29 17:44:08 +0200
commit9006e19aa76dabf9eb97635a90091addfd2d22db (patch)
tree9aa2ac67d1bf258a33e7434d45c01dfc40ff048b /nx-X11/programs
parent6f071341b766fc6adf99f15146dbc81298f64e2a (diff)
downloadnx-libs-9006e19aa76dabf9eb97635a90091addfd2d22db.tar.gz
nx-libs-9006e19aa76dabf9eb97635a90091addfd2d22db.tar.bz2
nx-libs-9006e19aa76dabf9eb97635a90091addfd2d22db.zip
Clipboard.c: cleanup in nxagentRequestSelection
Diffstat (limited to 'nx-X11/programs')
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Clipboard.c29
1 files changed, 13 insertions, 16 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
index f27342931..03430438e 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
@@ -724,46 +724,43 @@ FIXME: Do we need this?
lastServerProperty = X->xselectionrequest.property;
lastServerRequestor = X->xselectionrequest.requestor;
lastServerTarget = X->xselectionrequest.target;
+ lastServerTime = X->xselectionrequest.time;
/* by dimbor */
if (lastServerTarget != XA_STRING)
lastServerTarget = serverUTF8_STRING;
- lastServerTime = X->xselectionrequest.time;
-
+ /* prepare the request (like XConvertSelection, but internally) */
xEvent x = {0};
x.u.u.type = SelectionRequest;
x.u.selectionRequest.time = GetTimeInMillis();
x.u.selectionRequest.owner = lastSelectionOwner[i].window;
+ x.u.selectionRequest.selection = CurrentSelections[i].selection;
+ x.u.selectionRequest.property = clientCutProperty;
+ x.u.selectionRequest.requestor = screenInfo.screens[0]->root->drawable.id; /* Fictitious window.*/
/*
- * Fictitious window.
- */
-
- x.u.selectionRequest.requestor = screenInfo.screens[0]->root->drawable.id;
-
- /*
- * Don't send the same window, some programs are
- * clever and verify cut and paste operations
- * inside the same window and don't Notify at all.
+ * Don't send the same window, some programs are clever and
+ * verify cut and paste operations inside the same window and
+ * don't Notify at all.
*
* x.u.selectionRequest.requestor = lastSelectionOwnerWindow;
*/
- x.u.selectionRequest.selection = CurrentSelections[i].selection;
-
/* by dimbor (idea from zahvatov) */
if (X->xselectionrequest.target != XA_STRING)
x.u.selectionRequest.target = clientUTF8_STRING;
else
x.u.selectionRequest.target = XA_STRING;
- x.u.selectionRequest.property = clientCutProperty;
-
SendEventToClient(lastSelectionOwner[i].client, &x);
#ifdef DEBUG
- fprintf(stderr, "%s: Executed TryClientEvents with clientCutProperty.\n", __func__);
+ fprintf(stderr, "%s: sent SelectionRequest event to client [%d] property [%d][%s] target [%d][%s] requestor [0x%x].\n", __func__,
+ CLINDEX(lastSelectionOwner[i].client),
+ x.u.selectionRequest.property, NameForAtom(x.u.selectionRequest.property),
+ x.u.selectionRequest.target, NameForAtom(x.u.selectionRequest.target),
+ x.u.selectionRequest.requestor);
#endif
}
else