[gnome-shell] workspaceThumbnail: fix window tracking bugs
- From: Owen Taylor <otaylor src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] workspaceThumbnail: fix window tracking bugs
- Date: Wed, 18 Jan 2012 15:21:11 +0000 (UTC)
commit 0080440118aedc0545b9b84d4d8326338e94649b
Author: Owen W. Taylor <otaylor fishsoup net>
Date: Tue Jan 17 17:50:31 2012 -0500
workspaceThumbnail: fix window tracking bugs
- We should only call workspaceRemoved() for workspaces that are
are actually being removed.
- When we have multiple monitors, a window on a secondary monitor is
on all workspaces, so it ends up in all workspaces _allWindows
lists, so we can't use previous presence in that list to determine
whether we need to go ahead and add the actor; allWindows is simply
the list of windows where we are listening to notify::minimized.
https://bugzilla.gnome.org/show_bug.cgi?id=667652
js/ui/workspaceThumbnail.js | 22 ++++++++++++----------
1 files changed, 12 insertions(+), 10 deletions(-)
---
diff --git a/js/ui/workspaceThumbnail.js b/js/ui/workspaceThumbnail.js
index 993bceb..6b1dc80 100644
--- a/js/ui/workspaceThumbnail.js
+++ b/js/ui/workspaceThumbnail.js
@@ -303,17 +303,19 @@ const WorkspaceThumbnail = new Lang.Class({
return;
}
+ if (this._allWindows.indexOf(metaWin) == -1) {
+ let minimizedChangedId = metaWin.connect('notify::minimized',
+ Lang.bind(this,
+ this._updateMinimized));
+ this._allWindows.push(metaWin);
+ this._minimizedChangedIds.push(minimizedChangedId);
+ }
+
// We might have the window in our list already if it was on all workspaces and
// now was moved to this workspace
- if (this._allWindows.indexOf(metaWin) != -1)
+ if (this._lookupIndex (metaWin) != -1)
return;
- let minimizedChangedId = metaWin.connect('notify::minimized',
- Lang.bind(this,
- this._updateMinimized));
- this._allWindows.push(metaWin);
- this._minimizedChangedIds.push(minimizedChangedId);
-
if (!this._isMyWindow(win) || !this._isOverviewWindow(win))
return;
@@ -749,10 +751,10 @@ const ThumbnailsBox = new Lang.Class({
if (thumbnail.state > ThumbnailState.NORMAL)
continue;
- thumbnail.workspaceRemoved();
-
- if (currentPos >= start && currentPos < start + count)
+ if (currentPos >= start && currentPos < start + count) {
+ thumbnail.workspaceRemoved();
this._setThumbnailState(thumbnail, ThumbnailState.REMOVING);
+ }
currentPos++;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]