Fix a crash deleting a workspace, and another crash if the user tries to
select a workspace after deleting it. svn path=/trunk/; revision=174
This commit is contained in:
parent
f35ee1a5a0
commit
489f3306e6
@ -419,7 +419,7 @@ Workspace.prototype = {
|
|||||||
reactive: true
|
reactive: true
|
||||||
});
|
});
|
||||||
this._removeButton.set_from_file(global.imagedir + "remove-workspace.svg");
|
this._removeButton.set_from_file(global.imagedir + "remove-workspace.svg");
|
||||||
this._removeButton.connect('button-press-event', Lang.bind(this, this._removeSelf));
|
this._removeButton.connect('button-release-event', Lang.bind(this, this._removeSelf));
|
||||||
|
|
||||||
this.actor.add_actor(this._removeButton);
|
this.actor.add_actor(this._removeButton);
|
||||||
this._adjustRemoveButton();
|
this._adjustRemoveButton();
|
||||||
@ -674,6 +674,10 @@ Workspace.prototype = {
|
|||||||
});
|
});
|
||||||
|
|
||||||
this._visible = false;
|
this._visible = false;
|
||||||
|
|
||||||
|
// Don't let the user try to select this workspace as it's
|
||||||
|
// making its exit.
|
||||||
|
this._desktop.reactive = false;
|
||||||
},
|
},
|
||||||
|
|
||||||
destroy : function() {
|
destroy : function() {
|
||||||
@ -757,6 +761,7 @@ Workspace.prototype = {
|
|||||||
let workspace = screen.get_workspace_by_index(this.workspaceNum);
|
let workspace = screen.get_workspace_by_index(this.workspaceNum);
|
||||||
|
|
||||||
screen.remove_workspace(workspace, event.get_time());
|
screen.remove_workspace(workspace, event.get_time());
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -830,7 +835,7 @@ Workspaces.prototype = {
|
|||||||
reactive: true
|
reactive: true
|
||||||
});
|
});
|
||||||
plus.set_from_file(global.imagedir + "add-workspace.svg");
|
plus.set_from_file(global.imagedir + "add-workspace.svg");
|
||||||
plus.connect('button-press-event', this._appendNewWorkspace);
|
plus.connect('button-release-event', this._appendNewWorkspace);
|
||||||
this.actor.add_actor(plus);
|
this.actor.add_actor(plus);
|
||||||
plus.lower_bottom();
|
plus.lower_bottom();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user