diff options
author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2013-03-28 08:55:23 +0100 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2013-03-28 08:55:23 +0100 |
commit | e77bf36d9afbc7e56522574b06217d57c11dd095 (patch) | |
tree | 123ed036d60c80c816474f516bc0198be58d8410 /nx-X11/programs/Xserver/hw/nxagent/Clipboard.c | |
parent | d16188f08b659a6dc2a150d84c5ed5d7bf5cf02b (diff) | |
download | nx-libs-e77bf36d9afbc7e56522574b06217d57c11dd095.tar.gz nx-libs-e77bf36d9afbc7e56522574b06217d57c11dd095.tar.bz2 nx-libs-e77bf36d9afbc7e56522574b06217d57c11dd095.zip |
release 3.5.0.19
Diffstat (limited to 'nx-X11/programs/Xserver/hw/nxagent/Clipboard.c')
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/Clipboard.c | 29 |
1 files changed, 19 insertions, 10 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c index 2742e147f..d4fa4a979 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c @@ -166,7 +166,9 @@ Bool nxagentValidServerTargets(Atom target) if (target == XA_STRING) return True; if (target == serverTEXT) return True; - + /* by dimbor */ + if (target == serverUTF8_STRING) return True; + return False; } @@ -402,7 +404,12 @@ 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; x.u.u.type = SelectionRequest; x.u.selectionRequest.time = GetTimeInMillis(); @@ -424,11 +431,12 @@ FIXME: Do we need this? x.u.selectionRequest.selection = CurrentSelections[i].selection; - /* - * x.u.selectionRequest.target = X->xselectionrequest.target; - */ - - x.u.selectionRequest.target = XA_STRING; + /* 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; (void) TryClientEvents(lastSelectionOwner[i].client, &x, 1, @@ -1218,10 +1226,11 @@ int nxagentConvertSelection(ClientPtr client, WindowPtr pWin, Atom selection, Atom xa_STRING[4]; xEvent x; + /* --- Order changed by dimbor (prevent sending COMPOUND_TEXT to client --- */ xa_STRING[0] = XA_STRING; - xa_STRING[1] = clientTEXT; - xa_STRING[2] = clientCOMPOUND_TEXT; - xa_STRING[3] = clientUTF8_STRING; + xa_STRING[1] = clientUTF8_STRING; + xa_STRING[2] = clientTEXT; + xa_STRING[3] = clientCOMPOUND_TEXT; ChangeWindowProperty(pWin, property, |