Use noop output when there's no outputs connected

Instead of having NULL workspace->output pointers, use a noop output.
This should be safer.
This commit is contained in:
Ryan Dwyer 2019-01-17 20:16:23 +10:00 committed by emersion
parent ab0248a545
commit 2301349ad5
8 changed files with 29 additions and 28 deletions

View file

@ -158,13 +158,7 @@ void workspace_begin_destroy(struct sway_workspace *workspace) {
if (workspace->output) {
workspace_detach(workspace);
} else {
int index = list_find(root->saved_workspaces, workspace);
if (index != -1) {
list_del(root->saved_workspaces, index);
}
}
workspace->node.destroying = true;
node_set_dirty(&workspace->node);
}