From c90fb27a2f3d3047e185190089cef648bce6b58a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Thu, 17 Jun 2021 22:09:14 +0200 Subject: [PATCH] shellDBus: Fix FocusApp() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The appDisplay used to be accessible via the viewSelector, but that is gone now. Commit c09c070b15 adjusted the code, but the replacement uses a Main.overview.appDisplay accessor that never existed, whoops. Fix this by exposing a new selectApp() method directly on the overview, so we don't have to shuffle the appDisplay through controls → overviewActor → overview. Part-of: --- js/ui/overview.js | 5 +++++ js/ui/shellDBus.js | 3 +-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/js/ui/overview.js b/js/ui/overview.js index e6b3b2615..529779ea8 100644 --- a/js/ui/overview.js +++ b/js/ui/overview.js @@ -642,6 +642,11 @@ var Overview = class { this.show(OverviewControls.ControlsState.APP_GRID); } + selectApp(id) { + this.showApps(); + this._overview.controls.appDisplay.selectApp(id); + } + runStartupAnimation(callback) { Main.panel.style = 'transition-duration: 0ms;'; diff --git a/js/ui/shellDBus.js b/js/ui/shellDBus.js index 3028dfb68..39f142af9 100644 --- a/js/ui/shellDBus.js +++ b/js/ui/shellDBus.js @@ -100,8 +100,7 @@ var GnomeShell = class { } FocusApp(id) { - this.ShowApplications(); - Main.overview.appDisplay.selectApp(id); + Main.overview.selectApp(id); } ShowApplications() {