diff --git a/0001-x11-Update-X11-focus-before-updating-MetaDisplay-foc.patch b/0001-x11-Update-X11-focus-before-updating-MetaDisplay-foc.patch new file mode 100644 index 0000000..6daca60 --- /dev/null +++ b/0001-x11-Update-X11-focus-before-updating-MetaDisplay-foc.patch @@ -0,0 +1,45 @@ +From 71c3f4af3196b77fb52f395238f0704e7fa4d273 Mon Sep 17 00:00:00 2001 +From: Carlos Garnacho +Date: Tue, 22 Oct 2019 14:17:40 +0200 +Subject: [PATCH] x11: Update X11 focus before updating MetaDisplay focus + +In a similar vein to commit 8fd55fef853. This notably failed when setting +the focus on the stage (eg. to redirect key events to Clutter actors). +Deeper in MetaDisplay focus updating machinery, it would check +meta_stage_is_focused() which would still return FALSE at the time it's +called. + +This would not typically have side effects, but our "App does not respond" +dialogs see the focus change under their feet, so they try to bring +themselves to focus again. This results in a feedback loop. + +Changing the order results in later checks on the X11 POV of the focus +being correct, so focus is not mistakenly stolen from the close dialog, +and it actually succeeds in keeping the key focus. + +Fixes: https://gitlab.gnome.org/GNOME/gnome-shell/issues/1607 + +https://gitlab.gnome.org/GNOME/mutter/merge_requests/876 +--- + src/x11/meta-x11-display.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/x11/meta-x11-display.c b/src/x11/meta-x11-display.c +index 9fb3853bd..92ecb89da 100644 +--- a/src/x11/meta-x11-display.c ++++ b/src/x11/meta-x11-display.c +@@ -1934,10 +1934,10 @@ meta_x11_display_set_input_focus_xwindow (MetaX11Display *x11_display, + { + gulong serial; + +- meta_display_unset_input_focus (x11_display->display, timestamp); + serial = XNextRequest (x11_display->xdisplay); + meta_x11_display_set_input_focus_internal (x11_display, window, timestamp); + meta_x11_display_update_focus_window (x11_display, window, serial, TRUE); ++ meta_display_unset_input_focus (x11_display->display, timestamp); + } + + static MetaX11DisplayLogicalMonitorData * +-- +2.23.0 + diff --git a/mutter.spec b/mutter.spec index da01e32..fd47593 100644 --- a/mutter.spec +++ b/mutter.spec @@ -8,7 +8,7 @@ Name: mutter Version: 3.34.1 -Release: 6%{?dist} +Release: 7%{?dist} Summary: Window and compositing manager based on Clutter License: GPLv2+ @@ -56,6 +56,10 @@ Patch13: 0001-x11-Map-mimetypes-back-to-selection-atoms.patch # necessary for SDL2 apps to work correctly Patch14: 0001-window-Add-adjust_fullscreen_monitor_rect-virtual-me.patch Patch15: 0002-window-xwayland-Add-Xwayland-fullscreen-games-workar.patch +# https://gitlab.gnome.org/GNOME/mutter/merge_requests/884 +# Fixes issue with X11 cursor focus after '” is not responding' dialog shows up: +# https://gitlab.gnome.org/GNOME/gnome-shell/issues/1607 +Patch16: 0001-x11-Update-X11-focus-before-updating-MetaDisplay-foc.patch BuildRequires: chrpath BuildRequires: pango-devel @@ -200,6 +204,9 @@ desktop-file-validate %{buildroot}/%{_datadir}/applications/%{name}.desktop %{_datadir}/mutter-%{mutter_api_version}/tests %changelog +* Wed Nov 06 2019 LuK1337 - 3.34.1-7 +- Backport MR #884 + * Mon Nov 4 2019 Hans de Goede - 3.34.1-6 - Backport 2 patches which complement the backported Xwayland randr resolution change emulation support (necessary for SDL2 apps)