From f8f038657da0cbd6d18d2bbecee0a1b9af7d01d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Mon, 20 Apr 2026 18:05:05 +0200 Subject: [PATCH] Fix dropping menu grab on destroy Resolves: https://redhat.atlassian.net/browse/RHEL-171948 --- fix-dropping-menu-grab.patch | 65 ++++++++++++++++++++++++++++++++++++ gnome-shell.spec | 7 +++- 2 files changed, 71 insertions(+), 1 deletion(-) create mode 100644 fix-dropping-menu-grab.patch diff --git a/fix-dropping-menu-grab.patch b/fix-dropping-menu-grab.patch new file mode 100644 index 0000000..ff9a16a --- /dev/null +++ b/fix-dropping-menu-grab.patch @@ -0,0 +1,65 @@ +From d45377eaf231ac7ffa10a453c984381f5987f8ef Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Florian=20M=C3=BCllner?= +Date: Tue, 28 Jul 2020 17:50:58 +0200 +Subject: [PATCH 1/2] popupMenu: Ungrab when removing active menu + +While we do have some handling for removing the active menu, it has +been a no-op for years. The bit that we really care about from the +PopupMenuManager's point of view is the existing grab though. Drop +that instead of calling _closeMenu() directly; ungrabbing will still +call the method indirectly, and it will still be a no-op :-) + +https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3022 +--- + js/ui/popupMenu.js | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/js/ui/popupMenu.js b/js/ui/popupMenu.js +index d30c15788c..f62ea9db5d 100644 +--- a/js/ui/popupMenu.js ++++ b/js/ui/popupMenu.js +@@ -1217,7 +1217,7 @@ var PopupMenuManager = class { + + removeMenu(menu) { + if (menu == this.activeMenu) +- this._closeMenu(false, menu); ++ this._grabHelper.ungrab({ actor: menu.actor }); + + let position = this._findMenu(menu); + if (position == -1) // not a menu we manage +-- +2.53.0 + + +From a9e97a09d0fdeab7de434710440e041fa51ea386 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Florian=20M=C3=BCllner?= +Date: Tue, 28 Jul 2020 18:52:53 +0200 +Subject: [PATCH 2/2] panelMenu: Destroy menu before chaining up + +This avoid some (harmless but annoying) warnings, and is closer to +the original code prior to commit fc342fe8c5 and 557b232c896. + +https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3022 +--- + js/ui/panelMenu.js | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/js/ui/panelMenu.js b/js/ui/panelMenu.js +index bafafc11e6..eba1c7a1b0 100644 +--- a/js/ui/panelMenu.js ++++ b/js/ui/panelMenu.js +@@ -186,10 +186,9 @@ var Button = GObject.registerClass({ + } + + _onDestroy() { +- super._onDestroy(); +- + if (this.menu) + this.menu.destroy(); ++ super._onDestroy(); + } + }); + +-- +2.53.0 + diff --git a/gnome-shell.spec b/gnome-shell.spec index 97400fa..441b536 100644 --- a/gnome-shell.spec +++ b/gnome-shell.spec @@ -6,7 +6,7 @@ Name: gnome-shell Version: 3.32.2 -Release: 58%{?dist} +Release: 59%{?dist} Summary: Window management and application launching for GNOME Group: User Interface/Desktops @@ -79,6 +79,7 @@ Patch63: owe-support.patch Patch64: 0001-windowMenu-Ignore-release.patch Patch65: 0001-overview-Hide-the-overview-on-session-mode-hasOvervi.patch Patch66: 0001-st-theme-Reuse-stylesheets-if-possible.patch +Patch67: fix-dropping-menu-grab.patch # Backport JS invalid access warnings (#1651894, #1663171, #1642482, #1637622) Patch70: fix-invalid-access-warnings.patch @@ -305,6 +306,10 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/evolution-calendar.de %endif %changelog +* Wed May 13 2026 Florian Müllner - 3.32.2-59 +- Fix dropping menu grab on destroy + Resolves: RHEL-171948 + * Thu Aug 21 2025 Joan Torres Lopez - 3.32.2-58 - Don't hard depend on gnome-session-xsession to allow using other session types, e.g. wayland