]> git.eshelyaron.com Git - emacs.git/commitdiff
Work around I can't copy and paste unicode string to wayland chromium
authorYuuki Harano <masm+github@masm11.me>
Sat, 20 Feb 2021 08:48:11 +0000 (17:48 +0900)
committerYuuki Harano <masm+github@masm11.me>
Sat, 20 Feb 2021 08:48:11 +0000 (17:48 +0900)
* src/pgtkselect.c (Fpgtk_own_selection_internal):
Remove text/plain, since unicode strings are not correctly
encoded/decoded between Gtk and chromium(wayland) with it.

src/pgtkselect.c

index 2d81d1274cac865f016b9081305782d6b300b376..469e42f81657c6c039e2c0fd9facb2a45be27196 100644 (file)
@@ -371,6 +371,12 @@ nil, it defaults to the selected frame. */)
       list = gtk_target_list_new (NULL, 0);
       gtk_target_list_add_text_targets (list, 0);
 
+      {
+       /* text/plain: Strings encoded by Gtk are not correctly decoded by Chromium(Wayland). */
+       GdkAtom atom_text_plain = gdk_atom_intern("text/plain", false);
+       gtk_target_list_remove(list, atom_text_plain);
+      }
+
       targets = gtk_target_table_new_from_list (list, &n_targets);
 
       int size = SBYTES (value);