From 6d011a37005068a76c056fb27e4cd41e3a98a051 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Thu, 24 Jan 2013 12:14:19 +0100 Subject: [PATCH] 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 --- js/ui/overviewControls.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/js/ui/overviewControls.js b/js/ui/overviewControls.js index 4a528e2ff..0906885ac 100644 --- a/js/ui/overviewControls.js +++ b/js/ui/overviewControls.js @@ -2,6 +2,7 @@ const Clutter = imports.gi.Clutter; const Lang = imports.lang; +const Meta = imports.gi.Meta; const St = imports.gi.St; const Shell = imports.gi.Shell; @@ -248,7 +249,7 @@ const ThumbnailsSlider = new Lang.Class({ _getAlwaysZoomOut: function() { // Always show the pager when hover, during a drag, or if workspaces are // 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) { let monitors = Main.layoutManager.monitors;