Skip to content
Commit 7b0de621 authored by Christophe Fergeau's avatar Christophe Fergeau
Browse files

clipboard: Use gtk_clipboard_request_text for text data

Currently, when the agent asks us for VD_AGENT_CLIPBOARD_UTF8_TEXT data,
spice-gtk looks up for the first X11 target which would provide it with
UTF8_TEXT data, and uses that for the clipboard request. This means we
will use UTF8_STRING as the target for gtk_clipboard_request_contents().

However, some applications who can copy and paste text do not
necessarily support the UTF8_STRING target. This is the case for Motif
applications which support the STRING target however. It turns out gtk+
also provides a gtk_clipboard_request_text() method which will try
several targets (UTF8_TEXT, COMPOUND_TEXT, TEXT), and will ensure the
returned string is UTF-8, so we can use that when the agent asks us for
some text data.

This fixes https://bugzilla.redhat.com/show_bug.cgi?id=1348624
parent b0a2ff4f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment