Commit 783ceece authored by Jakub Janků's avatar Jakub Janků Committed by Victor Toso

clipboard: cancel request for targets on grab from client

If gtk_clipboard_set_with_data() is invoked between
gtk_clipboard_request_targets() and the
GtkClipboardTargetsReceivedFunc callback,
the targets we eventually receive are no longer valid.

To solve this, cancel the request in vdagent_clipboard_grab().

Otherwise we end up in a situation when vdagent holds
clipboard grab in the guest but cannot provide data to the
apps that request it - this can be observed in the log:

    CRITICAL **: 20:48:55.782: clipboard_get_cb: assertion 'c->selections[sel_id].owner == OWNER_CLIENT' failed
Signed-off-by: Jakub Janků's avatarJakub Janků <jjanku@redhat.com>
Acked-by: Victor Toso's avatarVictor Toso <victortoso@redhat.com>
parent 9874e30e
Pipeline #20648 passed with stage
in 29 minutes and 41 seconds