workspacesView: Always zoom out switcher when using static workspaces
We always leave the workspace switcher zoomed out when we can assume that the user is actually making use of workspaces. For the default dynamic workspace behavior, we make this assumption when more than two workspaces are in use (e.g. at least two workspaces contain windows plus an empty one at the end). However this test does not make sense when using static workspaces - in that case, not using workspaces would be indicated by a workspace number of 1 (in which case the entire switcher is hidden completely), so add a check for dynamic workspaces to the condition. https://bugzilla.gnome.org/show_bug.cgi?id=695126
This commit is contained in:
parent
f9d9caf417
commit
6d011a3700
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
const Clutter = imports.gi.Clutter;
|
const Clutter = imports.gi.Clutter;
|
||||||
const Lang = imports.lang;
|
const Lang = imports.lang;
|
||||||
|
const Meta = imports.gi.Meta;
|
||||||
const St = imports.gi.St;
|
const St = imports.gi.St;
|
||||||
const Shell = imports.gi.Shell;
|
const Shell = imports.gi.Shell;
|
||||||
|
|
||||||
@ -248,7 +249,7 @@ const ThumbnailsSlider = new Lang.Class({
|
|||||||
_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 more than one
|
||||||
let alwaysZoomOut = this.actor.hover || this.inDrag || global.screen.n_workspaces > 2;
|
let alwaysZoomOut = this.actor.hover || this.inDrag || !Meta.prefs_get_dynamic_workspaces() || global.screen.n_workspaces > 2;
|
||||||
|
|
||||||
if (!alwaysZoomOut) {
|
if (!alwaysZoomOut) {
|
||||||
let monitors = Main.layoutManager.monitors;
|
let monitors = Main.layoutManager.monitors;
|
||||||
|
Loading…
Reference in New Issue
Block a user