diff --git a/0001-x11-Map-mimetypes-back-to-selection-atoms.patch b/0001-x11-Map-mimetypes-back-to-selection-atoms.patch new file mode 100644 index 0000000..5e5e9ff --- /dev/null +++ b/0001-x11-Map-mimetypes-back-to-selection-atoms.patch @@ -0,0 +1,40 @@ +From 5c1be2233de15c7bb18bbb32b8071b78e992a0c5 Mon Sep 17 00:00:00 2001 +From: Carlos Garnacho +Date: Sat, 12 Oct 2019 19:15:11 +0200 +Subject: [PATCH] x11: Map mimetypes back to selection atoms + +This may be seen as the missing half of +https://gitlab.gnome.org/GNOME/mutter/merge_requests/842. Now that we +translate some atoms to better known mimetypes, we should also translate +those mimetypes to the underlying atoms if we might have added them. + +Fixes c&p from certain X11 clients. + +Fixes: https://gitlab.gnome.org/GNOME/mutter/issues/854 +--- + src/x11/meta-selection-source-x11.c | 9 +++++++++ + 1 file changed, 9 insertions(+) + +diff --git a/src/x11/meta-selection-source-x11.c b/src/x11/meta-selection-source-x11.c +index 1a0369ab0..55e500327 100644 +--- a/src/x11/meta-selection-source-x11.c ++++ b/src/x11/meta-selection-source-x11.c +@@ -82,6 +82,15 @@ meta_selection_source_x11_read_async (MetaSelectionSource *source, + task = g_task_new (source, cancellable, callback, user_data); + g_task_set_source_tag (task, meta_selection_source_x11_read_async); + ++ if (strcmp (mimetype, "text/plain") == 0 && ++ g_list_find_custom (source_x11->mimetypes, "STRING", ++ (GCompareFunc) g_strcmp0)) ++ mimetype = "STRING"; ++ else if (strcmp (mimetype, "text/plain;charset=utf-8") == 0 && ++ g_list_find_custom (source_x11->mimetypes, "UTF8_STRING", ++ (GCompareFunc) g_strcmp0)) ++ mimetype = "UTF8_STRING"; ++ + meta_x11_selection_input_stream_new_async (source_x11->x11_display, + source_x11->x11_display->selection.xwindow, + gdk_x11_get_xatom_name (source_x11->xselection), +-- +2.21.0 + diff --git a/mutter.spec b/mutter.spec index 2a40edd..5497fd2 100644 --- a/mutter.spec +++ b/mutter.spec @@ -8,7 +8,7 @@ Name: mutter Version: 3.34.1 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Window and compositing manager based on Clutter License: GPLv2+ @@ -46,6 +46,11 @@ Patch11: 0008-wayland-Figure-out-better-the-right-selection-source.patch # Fixes issue with X selection buffers in Qt applications: # https://bugzilla.redhat.com/show_bug.cgi?id=1758873 Patch12: 0001-x11-Translate-well-known-selection-atoms-to-mimetype.patch +# https://gitlab.gnome.org/GNOME/mutter/merge_requests/849 +# Fixes a bug introduced by MR #842 above: +# https://gitlab.gnome.org/GNOME/mutter/issues/854 +# https://bugzilla.redhat.com/show_bug.cgi?id=1758873#c28 +Patch13: 0001-x11-Map-mimetypes-back-to-selection-atoms.patch BuildRequires: chrpath BuildRequires: pango-devel @@ -190,6 +195,9 @@ desktop-file-validate %{buildroot}/%{_datadir}/applications/%{name}.desktop %{_datadir}/mutter-%{mutter_api_version}/tests %changelog +* Sun Oct 13 2019 Adam Williamson - 3.34.1-3 +- Backport MR #849 to fix bug introduced by MR #842 + * Sat Oct 12 2019 Adam Williamson - 3.34.1-2 - Backport multiple fixes for F31 FE/blocker bugs: MR #832 for #1749433 (also needs change in gnome-shell)