xwayland: Use the right atom type for further selection requests to X11
authorCarlos Garnacho <carlosg@gnome.org>
Wed, 10 May 2017 18:28:42 +0000 (20:28 +0200)
committerLaurent Bigonville <bigon@debian.org>
Fri, 30 Jun 2017 17:08:41 +0000 (18:08 +0100)
If we translate between text/plain;charset-utf-8 from the wayland side to
UTF8_STRING on the X11 side, we want to continue all further X11 selection
requests using the same translated UTF8_STRING atom than we use in the
first XConvertSelection call.

https://bugzilla.gnome.org/show_bug.cgi?id=782472

Gbp-Pq: Name bgo782472_fix_copypaste_x11_wayland.patch

src/wayland/meta-xwayland-selection.c

index a78e84666f51331784e4c57b0187078cdc85f1af..24b8cd2c1e91873f5f95cb0f3da096dcff69282b 100644 (file)
@@ -829,7 +829,7 @@ meta_x11_source_send (MetaWaylandDataSource *source,
   /* Takes ownership of fd */
   selection->x11_selection =
     x11_selection_data_new (compositor->xwayland_manager.selection_data,
-                            fd, mime_type);
+                            fd, gdk_x11_get_xatom_name (type_atom));
 
   XConvertSelection (xdisplay,
                      selection->selection_atom, type_atom,