GNOME Bugzilla – Bug 768082
wayland: copying from Wayland to NEdit (Xwayland/Motif) doesn't work
Last modified: 2016-06-30 12:12:26 UTC
Description: I just found out about this one while looking at bug 768007. Copy/paste from a native Wayland client to a Motif based Xclient running in Xwayland fails. Steps to reproduce: 1. Select some text in gnome-terminal and copy it (Ctrl-Shift-C) 2. Paste it in NEdit (Edit->Paste or Ctrl-V) Actual result: The cursor changes to a watch and nothing is pasted Expected result: The text copied from the Wayland client is pasted in the NEdit window.
I also saw this the other day. Apparently nedit requests the STRING target directly when pasting (i.e. no prior request of TARGETS), and gtk+/wayland don't manage that target too well, so the request goes ignored. Probably needs some special aliasing like with UTF8_STRING.
Created attachment 330424 [details] [review] wayland: Implement gdk_utf8_to_string_target The sanitize_utf8() function has been copied from X11 so both backends behave the same. This allows interaction with older clients (mainly through Xwayland, and the STRING selection target) that request non-utf8 text.
Review of attachment 330424 [details] [review]: Would be good to have a comment in the source that explains a) that this is a straight copy from the x11 backend and b) we need to support the STRING target for compat with old X clients
Agreed, adding that and pushing.
Attachment 330424 [details] pushed as 4b003a7 - wayland: Implement gdk_utf8_to_string_target