After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 781814 - Applications don't receive clipboard when data source mimetype is "text/plain;charset=utf-8"
Applications don't receive clipboard when data source mimetype is "text/plain...
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Backend: Wayland
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2017-04-27 05:14 UTC by iliyabo
Modified: 2017-10-26 22:52 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
clipboard: Try the mimetype first (1.79 KB, patch)
2017-05-03 21:13 UTC, Matthias Clasen
none Details | Review

Description iliyabo 2017-04-27 05:14:36 UTC
I'm currently using weston and I noticed that I can't copy text from some apps into GTK windows. The problem turns out to be (I debugged it) that when the data_source sends no UTF8_STRING mimetype, the window doesn't want to paste the clipboard contents. However, when copying from GTK apps they seem to "offer" the "text/plain;charset=utf-8" format, so I think that the intended behavior is to support pasting both formats.
Comment 1 Matthias Clasen 2017-05-03 21:13:09 UTC
Created attachment 351011 [details] [review]
clipboard: Try the mimetype first

Try text/plain;charset=utf-8 first, before falling back to
X11-isms like UTF8_TEXT. This makes things work on Wayland
compositors that don't carry a heavy X11 legacy around.
Comment 2 Hussam Al-Tayeb 2017-05-04 09:50:11 UTC
This broke copying text from Firefox to Firefox or other applications.
Copying text from epiphany, gedit, or libreoffice to firefox still works.

I reported a firefox bug https://bugzilla.mozilla.org/show_bug.cgi?id=1361979 just in case.
Comment 3 Peet 2017-05-10 16:24:22 UTC
This also breaks Chromium. I've temporarily reverted this commit on my machine.
Comment 4 Carlos Garnacho 2017-05-10 18:51:48 UTC
Fixed for X in commit 546433a4b7f. Wayland needs the patch in bug #782472.
Comment 5 Michael 2017-10-26 22:52:15 UTC
This breaks copying from non-GTK apps in Windows as well.  From what I can tell, the content of text/plain;charset=utf-8 is initialized with UTF8_STRING the first time it is requested, but never updated again after that.  Thus, pasting text from non-GTK apps on Windows will always return stale text.