mirror of
https://github.com/swaywm/sway.git
synced 2026-03-12 05:34:29 -04:00
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:
parent
ab0248a545
commit
2301349ad5
8 changed files with 29 additions and 28 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue