commit f3bc1939721794f333ec8b053ffff02b34076973
parent c8b3f11bb1916d3cf3d49ae44d1c33fb9c61f614
Author: Vladimir Panteleev <git@cy.md>
Date: Wed, 2 Feb 2022 22:07:42 +0000
Fix misusing type and property atoms in MULTIPLE handling
Diffstat:
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/xsel.c b/xsel.c
@@ -1582,13 +1582,14 @@ handle_multiple (Display * display, Window requestor, Atom property,
{
MultTrack * mt;
int format;
+ Atom type;
unsigned long bytesafter;
HandleResult retval = HANDLE_OK;
mt = xs_malloc (sizeof (MultTrack));
XGetWindowProperty (display, requestor, property, 0L, 1000000,
- False, (Atom)AnyPropertyType, &mt->property,
+ False, (Atom)AnyPropertyType, &type,
&format, &mt->length, &bytesafter,
(unsigned char **)&mt->atoms);
@@ -1600,6 +1601,7 @@ handle_multiple (Display * display, Window requestor, Atom property,
mt->display = display;
mt->requestor = requestor;
mt->sel = sel;
+ mt->property = property;
mt->selection = selection;
mt->time = time;
mt->index = 0;