diff options
author | Hans de Goede <hdegoede@redhat.com> | 2010-11-01 12:04:11 +0100 |
---|---|---|
committer | Hans de Goede <hdegoede@redhat.com> | 2010-11-01 12:04:11 +0100 |
commit | cfdec6b104f7db7a2cac2327925975cb187ee794 (patch) | |
tree | deea60d37c0848b55dcc3245b15753e98f67539e | |
parent | 899dc0656c7569b0c884025c714be165903016c4 (diff) |
vdagentd-x11: Work around a bug in xsel
Although ICCCM 2.2. Responsibilities of the Selection Owner:
http://tronche.com/gui/x/icccm/sec-2.html#s-2.2
Clearly states (about selection notify events):
The owner should set the specified selection, target, time, and property
arguments to the values received in the SelectionRequest event.
xsel sets the selection notify event target member to the incr atom when
it is going to send the clipboard data incremental, rather then setting
it to the UTF8_STRING atom (which was the target of the SelectionRequest).
Work around this (esp as it is likely other programs may get this wrong
too) and accept the incr atom as a valid target in a selection notify event.
-rw-r--r-- | vdagent-x11.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/vdagent-x11.c b/vdagent-x11.c index 7c3acb8..47de448 100644 --- a/vdagent-x11.c +++ b/vdagent-x11.c @@ -586,7 +586,8 @@ static void vdagent_x11_handle_selection_notify(struct vdagent_x11 *x11, if (x11->clipboard_request_target == None) fprintf(x11->errfile, "SelectionNotify received without a target\n"); else if (!incr && - event->xselection.target != x11->clipboard_request_target) + event->xselection.target != x11->clipboard_request_target && + event->xselection.target != x11->incr_atom) fprintf(x11->errfile, "Requested %s target got %s\n", vdagent_x11_get_atom_name(x11, x11->clipboard_request_target), vdagent_x11_get_atom_name(x11, event->xselection.target)); |