Unverified Commit a040e73a authored by Mike Gabriel's avatar Mike Gabriel

Merge branch 'uli42-pr/utf8_clipboard' into 3.6.x

parents 6f5e483c cfaf5972
...@@ -716,23 +716,28 @@ void nxagentRequestSelection(XEvent *X) ...@@ -716,23 +716,28 @@ void nxagentRequestSelection(XEvent *X)
* The selection does not matter here, we will return this for * The selection does not matter here, we will return this for
* PRIMARY and CLIPBOARD. * PRIMARY and CLIPBOARD.
* *
* FIXME: shouldn't we support UTF8_STRING, too?
* FIXME: I am wondering if we should align this with * FIXME: I am wondering if we should align this with
* nxagentConvertSelection, where we report more formats. * nxagentConvertSelection, where we report more formats.
* FIXME: the perfect solution should not just answer with * FIXME: the perfect solution should not just answer with
* XA_STRING but ask the real owner what format it supports. The * XA_STRING but ask the real owner what format it supports. The
* should then be sent to the original requestor. * should then be sent to the original requestor.
* FIXME: these must be external Atoms! * FIXME: add serverCOMPOUND_TEXT?
*/ */
Atom targets[] = {XA_STRING}; long targets[] = {XA_STRING, serverUTF8_STRING, serverTEXT, serverTARGETS, serverTIMESTAMP};
int numTargets = 1; int numTargets = sizeof(targets) / sizeof(targets[0]);
#ifdef DEBUG #ifdef DEBUG
fprintf(stderr, "%s: available targets:\n", __func__); {
for (int i = 0; i < numTargets; i++) fprintf(stderr, "%s: Sending %d available targets:\n", __func__, numTargets);
fprintf(stderr, "%s: %s\n", __func__, NameForAtom(targets[i])); for (int i = 0; i < numTargets; i++)
fprintf(stderr, "\n"); {
char *s = XGetAtomName(nxagentDisplay, targets[i]);
fprintf(stderr, "%s: %ld %s\n", __func__, targets[i], s);
SAFE_XFree(s);
}
fprintf(stderr, "\n");
}
#endif #endif
/* /*
...@@ -743,7 +748,7 @@ void nxagentRequestSelection(XEvent *X) ...@@ -743,7 +748,7 @@ void nxagentRequestSelection(XEvent *X)
X->xselectionrequest.requestor, X->xselectionrequest.requestor,
X->xselectionrequest.property, X->xselectionrequest.property,
XInternAtom(nxagentDisplay, "ATOM", 0), XInternAtom(nxagentDisplay, "ATOM", 0),
sizeof(Atom)*8, 32,
PropModeReplace, PropModeReplace,
(unsigned char*)&targets, (unsigned char*)&targets,
numTargets); numTargets);
...@@ -1702,7 +1707,7 @@ int nxagentConvertSelection(ClientPtr client, WindowPtr pWin, Atom selection, ...@@ -1702,7 +1707,7 @@ int nxagentConvertSelection(ClientPtr client, WindowPtr pWin, Atom selection,
{ {
/* --- Order changed by dimbor (prevent sending COMPOUND_TEXT to client --- */ /* --- Order changed by dimbor (prevent sending COMPOUND_TEXT to client --- */
Atom targets[] = {XA_STRING, clientUTF8_STRING, clientTEXT, clientCOMPOUND_TEXT}; Atom targets[] = {XA_STRING, clientUTF8_STRING, clientTEXT, clientCOMPOUND_TEXT};
int numTargets = 4; int numTargets = sizeof(targets) / sizeof(targets[0]);
#ifdef DEBUG #ifdef DEBUG
fprintf(stderr, "%s: available targets:\n", __func__); fprintf(stderr, "%s: available targets:\n", __func__);
......
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