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 768082 - wayland: copying from Wayland to NEdit (Xwayland/Motif) doesn't work
wayland: copying from Wayland to NEdit (Xwayland/Motif) doesn't work
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: 2016-06-27 07:32 UTC by Olivier Fourdan
Modified: 2016-06-30 12:12 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
wayland: Implement gdk_utf8_to_string_target (2.37 KB, patch)
2016-06-27 10:03 UTC, Carlos Garnacho
committed Details | Review

Description Olivier Fourdan 2016-06-27 07:32:44 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.
Comment 1 Carlos Garnacho 2016-06-27 09:47:34 UTC
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.
Comment 2 Carlos Garnacho 2016-06-27 10:03:21 UTC
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.
Comment 3 Matthias Clasen 2016-06-30 03:08:11 UTC
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
Comment 4 Carlos Garnacho 2016-06-30 11:49:54 UTC
Agreed, adding that and pushing.
Comment 5 Carlos Garnacho 2016-06-30 12:12:22 UTC
Attachment 330424 [details] pushed as 4b003a7 - wayland: Implement gdk_utf8_to_string_target