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
This commit is contained in:
parent
80dfda17cd
commit
74ed3646ad
@ -297,16 +297,18 @@ WorkspaceThumbnail.prototype = {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// We might have the window in our list already if it was on all workspaces and
|
if (this._allWindows.indexOf(metaWin) == -1) {
|
||||||
// now was moved to this workspace
|
|
||||||
if (this._allWindows.indexOf(metaWin) != -1)
|
|
||||||
return;
|
|
||||||
|
|
||||||
let minimizedChangedId = metaWin.connect('notify::minimized',
|
let minimizedChangedId = metaWin.connect('notify::minimized',
|
||||||
Lang.bind(this,
|
Lang.bind(this,
|
||||||
this._updateMinimized));
|
this._updateMinimized));
|
||||||
this._allWindows.push(metaWin);
|
this._allWindows.push(metaWin);
|
||||||
this._minimizedChangedIds.push(minimizedChangedId);
|
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._lookupIndex (metaWin) != -1)
|
||||||
|
return;
|
||||||
|
|
||||||
if (!this._isMyWindow(win) || !this._isOverviewWindow(win))
|
if (!this._isMyWindow(win) || !this._isOverviewWindow(win))
|
||||||
return;
|
return;
|
||||||
@ -601,10 +603,10 @@ ThumbnailsBox.prototype = {
|
|||||||
if (thumbnail.state > ThumbnailState.NORMAL)
|
if (thumbnail.state > ThumbnailState.NORMAL)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
if (currentPos >= start && currentPos < start + count) {
|
||||||
thumbnail.workspaceRemoved();
|
thumbnail.workspaceRemoved();
|
||||||
|
|
||||||
if (currentPos >= start && currentPos < start + count)
|
|
||||||
this._setThumbnailState(thumbnail, ThumbnailState.REMOVING);
|
this._setThumbnailState(thumbnail, ThumbnailState.REMOVING);
|
||||||
|
}
|
||||||
|
|
||||||
currentPos++;
|
currentPos++;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user