appDisplay: Animate activate-discrete-gpu action in the AppIconMenu

Just as we animate the apps launch using the zoom out animation if the
'new-window' action provided by the app is launched, we should also show
this animation if the 'activate-discrete-gpu' action provided by the app
via its AppInfo is launched.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/673
This commit is contained in:
Jonas Dreßler 2019-08-08 18:15:32 +02:00 committed by Florian Müllner
parent 1dadbd0cbb
commit 87f5aa7a13

View File

@ -2056,7 +2056,8 @@ var AppIconMenu = class AppIconMenu extends PopupMenu.PopupMenu {
let action = actions[i]; let action = actions[i];
let item = this._appendMenuItem(appInfo.get_action_name(action)); let item = this._appendMenuItem(appInfo.get_action_name(action));
item.connect('activate', (emitter, event) => { item.connect('activate', (emitter, event) => {
if (action == 'new-window') if (action == 'new-window' ||
action == 'activate-discrete-gpu')
this._source.animateLaunch(); this._source.animateLaunch();
this._source.app.launch_action(action, event.get_time(), -1); this._source.app.launch_action(action, event.get_time(), -1);