diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js index e806f61b8..8af04a81b 100644 --- a/js/ui/appDisplay.js +++ b/js/ui/appDisplay.js @@ -791,7 +791,7 @@ RunningWellItem.prototype = { id = this.appInfo.get_id(); else id = null; - Main.overview.setWindowApplicationFilter(id); + Main.overview.beginApplicationWindowSelection(id); })); } diff --git a/js/ui/overview.js b/js/ui/overview.js index 3100893bc..1747da276 100644 --- a/js/ui/overview.js +++ b/js/ui/overview.js @@ -397,16 +397,18 @@ Overview.prototype = { this._workspaces.setHighlightWindow(metaWindow); }, + /** - * setWindowApplicationFilter: - * @id: A string application identifier + * beginApplicationWindowSelection: + * @appid: Application identifier string * - * Hide all windows which are not owned by the application - * identified by @id. + * Enter a mode which shows only the widnows owned by the + * given application, and allow highlighting of a specific + * window with setHighlightWindow(). */ - setWindowApplicationFilter: function (id) { + beginApplicationWindowSelection: function (appid) { if (this._workspaces) - this._workspaces.setWindowApplicationFilter(id); + this._workspaces.beginApplicationWindowSelection(appid); }, //// Private methods //// diff --git a/js/ui/workspaces.js b/js/ui/workspaces.js index 07a7fc730..a7707472a 100644 --- a/js/ui/workspaces.js +++ b/js/ui/workspaces.js @@ -130,17 +130,6 @@ WindowClone.prototype = { this._inDrag = false; }, - setHighlighted: function (highlighted) { - let factor = 0.1; - if (highlighted) { - this.actor.scale_x += factor; - this.actor.scale_y += factor; - } else { - this.actor.scale_x -= factor; - this.actor.scale_y -= factor; - } - }, - setVisibleWithChrome: function(visible) { if (visible) { this.actor.show(); @@ -568,11 +557,19 @@ Workspace.prototype = { this.positionWindows(false); }, + /** + * setLightboxMode: + * @showLightbox: If true, dim background and allow highlighting a specific window + * + * This function also resets the highlighted window state. + */ setLightboxMode: function (showLightbox) { - if (showLightbox) + if (showLightbox) { + this.setHighlightWindow(null); this._lightbox.show(); - else + } else { this._lightbox.hide(); + } }, setHighlightWindow: function (metaWindow) { @@ -1153,7 +1150,6 @@ Workspaces.prototype = { // highlighted window while trying to handle the window or workspace possibly // going away. for (let i = 0; i < this._workspaces.length; i++) { - this._workspaces[i].setLightboxMode(metaWindow != null); this._workspaces[i].setHighlightWindow(null); } if (metaWindow != null) { @@ -1162,7 +1158,7 @@ Workspaces.prototype = { } }, - setWindowApplicationFilter: function (appId) { + beginApplicationWindowSelection: function (appId) { let appSys = Shell.AppMonitor.get_default(); let showOnlyWindows; @@ -1177,6 +1173,7 @@ Workspaces.prototype = { } this._appIdFilter = appId; for (let i = 0; i < this._workspaces.length; i++) { + this._workspaces[i].setLightboxMode(showOnlyWindows != null); this._workspaces[i].setShowOnlyWindows(showOnlyWindows); } },