workspace: avoid an assertion in a new window/deleted workspace race
If a window appeared on a workspace that was then quickly removed, we could hit an assertion in mutter. Avoid that. https://bugzilla.gnome.org/show_bug.cgi?id=648132
This commit is contained in:
parent
d97657b151
commit
e38d83fd44
@ -1113,7 +1113,9 @@ Workspace.prototype = {
|
||||
// the compositor finds out about them...
|
||||
Mainloop.idle_add(Lang.bind(this,
|
||||
function () {
|
||||
if (this.actor && metaWin.get_compositor_private())
|
||||
if (this.actor &&
|
||||
metaWin.get_compositor_private() &&
|
||||
metaWin.get_workspace() == this.metaWorkspace)
|
||||
this._doAddWindow(metaWin);
|
||||
return false;
|
||||
}));
|
||||
|
@ -276,7 +276,9 @@ WorkspaceThumbnail.prototype = {
|
||||
// the compositor finds out about them...
|
||||
Mainloop.idle_add(Lang.bind(this,
|
||||
function () {
|
||||
if (this.actor && metaWin.get_compositor_private())
|
||||
if (this.actor &&
|
||||
metaWin.get_compositor_private() &&
|
||||
metaWin.get_workspace() == this.metaWorkspace)
|
||||
this._doAddWindow(metaWin);
|
||||
return false;
|
||||
}));
|
||||
|
Loading…
Reference in New Issue
Block a user