Commit 21598c7e authored by Ulrich Sibiller's avatar Ulrich Sibiller Committed by Mike Gabriel

Clipboard.c: fix: translate target on transfer

parent b5cac672
......@@ -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,
......
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