appMenu: Hide overview when activating apps

This is the expected behavior when activating a window or app. Until
now we could rely on the menu being hidden in the overview, but as
that is about to change, make sure the menu behaves as expected.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1948>
This commit is contained in:
Florian Müllner 2021-08-11 22:54:11 +02:00 committed by Marge Bot
parent 958fb6fddc
commit b3861ca693

View File

@ -39,6 +39,7 @@ var AppMenu = class AppMenu extends PopupMenu.PopupMenu {
this._newWindowItem = this.addAction(_('New Window'), () => {
this._app.open_new_window(-1);
Main.overview.hide();
});
this.addMenuItem(new PopupMenu.PopupSeparatorMenuItem());
@ -126,6 +127,7 @@ var AppMenu = class AppMenu extends PopupMenu.PopupMenu {
const label = appInfo.get_action_name(action);
this._actionSection.addAction(label, event => {
this._app.launch_action(action, event.get_time(), -1);
Main.overview.hide();
});
});