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
Loading
Please register or sign in to comment