aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Sibiller <uli42@gmx.de>2019-08-08 21:44:15 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2019-09-29 17:44:08 +0200
commit21598c7e213d92d83417608a413f4ec34b4d5ef1 (patch)
treea1b0b29bc92d4b10601f0535096202532677c96f
parentb5cac6722b0275d3ccdf0730e651232b0d621cb2 (diff)
downloadnx-libs-21598c7e213d92d83417608a413f4ec34b4d5ef1.tar.gz
nx-libs-21598c7e213d92d83417608a413f4ec34b4d5ef1.tar.bz2
nx-libs-21598c7e213d92d83417608a413f4ec34b4d5ef1.zip
Clipboard.c: fix: translate target on transfer
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Clipboard.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
index 3ecb8f161..639fc293d 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
@@ -1927,6 +1927,29 @@ int nxagentSendNotify(xEvent *event)
eventSelection.selection = lastSelectionOwner[nxagentClipboardSelection].selection;
}
+ /*
+ * .target must be translated, too, as a client on the real
+ * server is requested to fill our property and it needs to know
+ * the format.
+ */
+
+ if (event->u.selectionNotify.target == clientUTF8_STRING)
+ {
+ eventSelection.target = serverUTF8_STRING;
+ }
+ else if (event->u.selectionNotify.target == clientTEXT)
+ {
+ eventSelection.target = serverTEXT;
+ }
+ /*else if (event->u.selectionNotify.target == clientCOMPOUND_TEXT)
+ {
+ eventSelection.target = serverCOMPOUND_TEXT;
+ }*/
+ else
+ {
+ eventSelection.target = XA_STRING;
+ }
+
#ifdef DEBUG
fprintf(stderr, "%s: mapping local to remote Atom: [%d] -> [%ld] [%s]\n", __func__,
event->u.selectionNotify.selection, eventSelection.selection,