summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2017-09-02 13:32:53 (GMT)
committerfvogel <fvogelnew1@free.fr>2017-09-02 13:32:53 (GMT)
commitd63f304c0b6fb64c1dc3236ad322e8f46aac3ac2 (patch)
tree0ef10d0e91184b6ff5fa0f5bdcc2502d6c3387fb
parent8acd334a1e6c5bad786a058d93708d28c6c5fdf6 (diff)
downloadtk-d63f304c0b6fb64c1dc3236ad322e8f46aac3ac2.zip
tk-d63f304c0b6fb64c1dc3236ad322e8f46aac3ac2.tar.gz
tk-d63f304c0b6fb64c1dc3236ad322e8f46aac3ac2.tar.bz2
Fix [73ba07efcd]: Use correct property type when handling MULTIPLE conversion requests. Patch from 'dpb'
-rw-r--r--generic/tkInt.h1
-rw-r--r--generic/tkSelect.c1
-rw-r--r--unix/tkUnixSelect.c9
3 files changed, 7 insertions, 4 deletions
diff --git a/generic/tkInt.h b/generic/tkInt.h
index a28cae4..4b5aebb 100644
--- a/generic/tkInt.h
+++ b/generic/tkInt.h
@@ -423,6 +423,7 @@ typedef struct TkDisplay {
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
diff --git a/generic/tkSelect.c b/generic/tkSelect.c
index d763411..fcfd323 100644
--- a/generic/tkSelect.c
+++ b/generic/tkSelect.c
@@ -1185,6 +1185,7 @@ TkSelInit(
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
diff --git a/unix/tkUnixSelect.c b/unix/tkUnixSelect.c
index dacbd99..6d379ec 100644
--- a/unix/tkUnixSelect.c
+++ b/unix/tkUnixSelect.c
@@ -872,8 +872,9 @@ ConvertSelection(
goto refuse;
}
result = XGetWindowProperty(eventPtr->display, eventPtr->requestor,
- eventPtr->property, 0, MAX_PROP_WORDS, False, XA_ATOM,
- &type, &format, &incr.numConversions, &bytesAfter,
+ 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)) {
@@ -1035,8 +1036,8 @@ ConvertSelection(
}
if (multiple) {
XChangeProperty(reply.xsel.display, reply.xsel.requestor,
- reply.xsel.property, XA_ATOM, 32, PropModeReplace,
- (unsigned char *) incr.multAtoms,
+ reply.xsel.property, winPtr->dispPtr->atomPairAtom,
+ 32, PropModeReplace, (unsigned char *) incr.multAtoms,
(int) incr.numConversions*2);
} else {
/*