Attachment "atom-pair.patch" to
ticket [73ba07ef]
added by
dpb
2017-08-22 19:55:12.
Index: generic/tkInt.h
==================================================================
--- generic/tkInt.h
+++ generic/tkInt.h
@@ -421,10 +421,11 @@
Atom compoundTextAtom; /* Atom for COMPOUND_TEXT. */
Atom applicationAtom; /* Atom for TK_APPLICATION. */
Atom windowAtom; /* Atom for TK_WINDOW. */
Atom clipboardAtom; /* Atom for CLIPBOARD. */
Atom utf8Atom; /* Atom for UTF8_STRING. */
+ Atom atomPairAtom; /* Atom for ATOM_PAIR. */
Tk_Window clipWindow; /* Window used for clipboard ownership and to
* retrieve selections between processes. NULL
* means clipboard info hasn't been
* initialized. */
Index: generic/tkSelect.c
==================================================================
--- generic/tkSelect.c
+++ generic/tkSelect.c
@@ -1183,10 +1183,11 @@
dispPtr->textAtom = Tk_InternAtom(tkwin, "TEXT");
dispPtr->compoundTextAtom = Tk_InternAtom(tkwin, "COMPOUND_TEXT");
dispPtr->applicationAtom = Tk_InternAtom(tkwin, "TK_APPLICATION");
dispPtr->windowAtom = Tk_InternAtom(tkwin, "TK_WINDOW");
dispPtr->clipboardAtom = Tk_InternAtom(tkwin, "CLIPBOARD");
+ dispPtr->atomPairAtom = Tk_InternAtom(tkwin, "ATOM_PAIR");
/*
* Using UTF8_STRING instead of the XA_UTF8_STRING macro allows us to
* support older X servers that didn't have UTF8_STRING yet. This is
* necessary on Unix systems. For more information, see:
Index: unix/tkUnixSelect.c
==================================================================
--- unix/tkUnixSelect.c
+++ unix/tkUnixSelect.c
@@ -870,11 +870,11 @@
incr.multAtoms = NULL;
if (eventPtr->property == None) {
goto refuse;
}
result = XGetWindowProperty(eventPtr->display, eventPtr->requestor,
- eventPtr->property, 0, MAX_PROP_WORDS, False, XA_ATOM,
+ eventPtr->property, 0, MAX_PROP_WORDS, False, winPtr->dispPtr->atomPairAtom,
&type, &format, &incr.numConversions, &bytesAfter,
(unsigned char **) multAtomsPtr);
if ((result != Success) || (bytesAfter != 0) || (format != 32)
|| (type == None)) {
if (incr.multAtoms != NULL) {
@@ -1033,11 +1033,11 @@
incr.nextPtr = tsdPtr->pendingIncrs;
tsdPtr->pendingIncrs = &incr;
}
if (multiple) {
XChangeProperty(reply.xsel.display, reply.xsel.requestor,
- reply.xsel.property, XA_ATOM, 32, PropModeReplace,
+ reply.xsel.property, winPtr->dispPtr->atomPairAtom, 32, PropModeReplace,
(unsigned char *) incr.multAtoms,
(int) incr.numConversions*2);
} else {
/*
* Not a MULTIPLE request. The first property in "multAtoms" got set