[gnome-shell] overview: Restore previous workspace switcher policy
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] overview: Restore previous workspace switcher policy
- Date: Tue, 14 Aug 2018 17:39:01 +0000 (UTC)
commit 764fbbe0524e89eb25cad8894fa4091f3fa47ac7
Author: Florian Müllner <fmuellner gnome org>
Date: Fri Jul 20 20:35:54 2018 +0200
overview: Restore previous workspace switcher policy
We used to keep the workspace switcher slid out when the user made use
of workspaces. This was changed in commit 2d84975 to give more space
to window previews, but it turned out to make the switcher quite a lot
more difficult to interact with (rather than only being a question of
discoverability). So go back to the previous behavior.
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/161
js/ui/overviewControls.js | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
---
diff --git a/js/ui/overviewControls.js b/js/ui/overviewControls.js
index 1b1c9cf10..4cd161374 100644
--- a/js/ui/overviewControls.js
+++ b/js/ui/overviewControls.js
@@ -253,13 +253,23 @@ var ThumbnailsSlider = new Lang.Class({
this.actor.add_actor(this._thumbnailsBox.actor);
Main.layoutManager.connect('monitors-changed', this._updateSlide.bind(this));
+ global.workspace_manager.connect('active-workspace-changed',
+ this._updateSlide.bind(this));
+ global.workspace_manager.connect('notify::n-workspaces',
+ this._updateSlide.bind(this));
this.actor.connect('notify::hover', this._updateSlide.bind(this));
this._thumbnailsBox.actor.bind_property('visible', this.actor, 'visible',
GObject.BindingFlags.SYNC_CREATE);
},
_getAlwaysZoomOut() {
- // Always show the pager on hover or during a drag
- let alwaysZoomOut = this.actor.hover || this._inDrag;
+ // Always show the pager on hover, during a drag, or if workspaces are
+ // actually used, e.g. there are windows on any non-active workspace
+ let workspaceManager = global.workspace_manager;
+ let alwaysZoomOut = this.actor.hover ||
+ this._inDrag ||
+ !Meta.prefs_get_dynamic_workspaces() ||
+ workspaceManager.n_workspaces > 2 ||
+ workspaceManager.get_active_workspace_index() != 0;
if (!alwaysZoomOut) {
let monitors = Main.layoutManager.monitors;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]