GNOME Bugzilla – Bug 782472
UTF8_STRING<->text/plain;charset=utf-8 translation bug between x11 and wayland clients
Last modified: 2017-10-29 18:29:27 UTC
Patch in bug #781814 actually exercised for the first time the translation mutter does between the UTF8_STRING atom and the text/plain;charset=utf-8 mimetype, and it uncovered a bug. Turns out we do the first XConvertSelection call with the transformed mimetype, but set up the corresponding X11SelectionData struct with the untransformed mimetype. So all subsequent operations are possibly done on the wrong mimetype. This broke c&p from some x11 clients to GTK+ apps. Attaching a patch.
Created attachment 351576 [details] [review] xwayland: Use the right atom type for further selection requests to X11 If the text/plain;charset=utf-8 to UTF8_STRING conversion kicks in, we'd still expect the former even if we started with the latter. Store the actual mimetype we're interfacing with on the X11 side.
*** Bug 782453 has been marked as a duplicate of this bug. ***
Attachment 351576 [details] pushed as 5758401 - xwayland: Use the right atom type for further selection requests to X11
I see this problem in ubuntu 17.10 with wayland and gnome 3.26: copy&paste from gnome-terminal to gedit or chrome hangs. Sometimes it workssss after waiting a minute. Message in syslog: gnome-terminal-[4384]: Error writing selection data: Error writing to file descriptor: Broken pipe