Skip to content

Commit

Permalink
Merge pull request #45 from CyberShadow/fix-multiple
Browse files Browse the repository at this point in the history
Fix MULTIPLE conversion requests
  • Loading branch information
kfish authored Mar 10, 2022

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
2 parents 2827689 + f3bc193 commit 5782376
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion xsel.c
Original file line number Diff line number Diff line change
@@ -1583,13 +1583,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);

@@ -1601,6 +1602,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;
@@ -1668,6 +1670,7 @@ handle_selection_request (XEvent event, unsigned char * sel)
ev.property = None;
} else {
/* Handle MULTIPLE request */
ev.property = xsr->property;
hr = handle_multiple (ev.display, ev.requestor, ev.property, sel,
ev.selection, ev.time, NULL);
}

0 comments on commit 5782376

Please sign in to comment.