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
This commit is contained in:
Florian Müllner 2020-07-28 17:50:58 +02:00 committed by Georges Basile Stavracas Neto
parent 71d37bffdf
commit 260405a49e

View File

@ -1325,7 +1325,7 @@ var PopupMenuManager = class {
removeMenu(menu) { removeMenu(menu) {
if (menu == this.activeMenu) if (menu == this.activeMenu)
this._closeMenu(false, menu); this._grabHelper.ungrab({ actor: menu.actor });
let position = this._findMenu(menu); let position = this._findMenu(menu);
if (position == -1) // not a menu we manage if (position == -1) // not a menu we manage