[gnome-shell] workspaceThumbnails: Fix removal of multiple workspaces
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] workspaceThumbnails: Fix removal of multiple workspaces
- Date: Sat, 26 Apr 2014 15:51:06 +0000 (UTC)
commit 05ddece9a0b966e61d4952813d8ce008e11554e6
Author: Florian Müllner <fmuellner gnome org>
Date: Fri Apr 25 01:56:31 2014 +0200
workspaceThumbnails: Fix removal of multiple workspaces
When workspaces have been removed, we need to remove the corresponding
thumbnails as well; the number of thumbnails that need removing is
the difference between the old number of workspaces and the new one.
Currently we assume that the old number of workspaces corresponds to
the number of existing thumbnails, but that may actually be wrong:
A thumbnail will still be animated out after its workspace has been
removed. As a result, we end up removing too many thumbnails when a
workspace is removed while a thumbnail of a previously removed workspace
is still animating out. Fix this by basing the old number of workspaces
only on thumbnails that have not been removed previously.
https://bugzilla.gnome.org/show_bug.cgi?id=728820
js/ui/workspaceThumbnail.js | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/js/ui/workspaceThumbnail.js b/js/ui/workspaceThumbnail.js
index 113f2a7..1eb843d 100644
--- a/js/ui/workspaceThumbnail.js
+++ b/js/ui/workspaceThumbnail.js
@@ -903,7 +903,10 @@ const ThumbnailsBox = new Lang.Class({
},
_workspacesChanged: function() {
- let oldNumWorkspaces = this._thumbnails.length;
+ let validThumbnails = this._thumbnails.filter(function(t) {
+ return t.state <= ThumbnailState.NORMAL;
+ });
+ let oldNumWorkspaces = validThumbnails.length;
let newNumWorkspaces = global.screen.n_workspaces;
let active = global.screen.get_active_workspace_index();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]