overviewControls: Adjust heuristic for hiding workspace switcher
The workspace switcher should be expanded when workspaces are in use. Our current implementation assumes that workspaces are used when there are windows on at least two workspaces. However workspaces are already used when moving from a non-empty workspace to an empty one (presumably with the intention to launch something on that workspace), so tweak the heuristic accordingly. https://bugzilla.gnome.org/show_bug.cgi?id=662457
This commit is contained in:
parent
0a4ad01d8a
commit
50f0fc4e23
@ -259,13 +259,18 @@ const ThumbnailsSlider = new Lang.Class({
|
|||||||
|
|
||||||
Main.layoutManager.connect('monitors-changed', Lang.bind(this, this._updateSlide));
|
Main.layoutManager.connect('monitors-changed', Lang.bind(this, this._updateSlide));
|
||||||
this.actor.connect('notify::hover', Lang.bind(this, this._updateSlide));
|
this.actor.connect('notify::hover', Lang.bind(this, this._updateSlide));
|
||||||
|
global.window_manager.connect('switch-workspace', Lang.bind(this, this._updateSlide));
|
||||||
this._thumbnailsBox.actor.bind_property('visible', this.actor, 'visible', GObject.BindingFlags.SYNC_CREATE);
|
this._thumbnailsBox.actor.bind_property('visible', this.actor, 'visible', GObject.BindingFlags.SYNC_CREATE);
|
||||||
},
|
},
|
||||||
|
|
||||||
_getAlwaysZoomOut: function() {
|
_getAlwaysZoomOut: function() {
|
||||||
// Always show the pager when hover, during a drag, or if workspaces are
|
// Always show the pager when hover, during a drag, or if workspaces are
|
||||||
// actually used, e.g. there are windows on more than one
|
// actually used, e.g. there are windows on any non-active workspace
|
||||||
let alwaysZoomOut = this.actor.hover || this._inDrag || !Meta.prefs_get_dynamic_workspaces() || global.screen.n_workspaces > 2;
|
let alwaysZoomOut = this.actor.hover ||
|
||||||
|
this._inDrag ||
|
||||||
|
!Meta.prefs_get_dynamic_workspaces() ||
|
||||||
|
global.screen.n_workspaces > 2 ||
|
||||||
|
global.screen.get_active_workspace_index() != 0;
|
||||||
|
|
||||||
if (!alwaysZoomOut) {
|
if (!alwaysZoomOut) {
|
||||||
let monitors = Main.layoutManager.monitors;
|
let monitors = Main.layoutManager.monitors;
|
||||||
|
Loading…
Reference in New Issue
Block a user