diff options
author | Ryan Dwyer <ryandwyer1@gmail.com> | 2019-01-17 20:16:23 +1000 |
---|---|---|
committer | emersion <contact@emersion.fr> | 2019-01-22 09:55:13 +0100 |
commit | 2301349ad59751640ed9e59dd22edeafaf09da39 (patch) | |
tree | 1726c2f8ec1cd9baaf27fbed62aa6a337bc85ce7 /sway/tree/workspace.c | |
parent | seat_create: set initial focus for added seats (diff) | |
download | sway-2301349ad59751640ed9e59dd22edeafaf09da39.tar.gz sway-2301349ad59751640ed9e59dd22edeafaf09da39.tar.zst sway-2301349ad59751640ed9e59dd22edeafaf09da39.zip |
Use noop output when there's no outputs connected
Instead of having NULL workspace->output pointers, use a noop output.
This should be safer.
Diffstat (limited to 'sway/tree/workspace.c')
-rw-r--r-- | sway/tree/workspace.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/sway/tree/workspace.c b/sway/tree/workspace.c index e89c0849..8b3eb2ad 100644 --- a/sway/tree/workspace.c +++ b/sway/tree/workspace.c | |||
@@ -158,13 +158,7 @@ void workspace_begin_destroy(struct sway_workspace *workspace) { | |||
158 | 158 | ||
159 | if (workspace->output) { | 159 | if (workspace->output) { |
160 | workspace_detach(workspace); | 160 | workspace_detach(workspace); |
161 | } else { | ||
162 | int index = list_find(root->saved_workspaces, workspace); | ||
163 | if (index != -1) { | ||
164 | list_del(root->saved_workspaces, index); | ||
165 | } | ||
166 | } | 161 | } |
167 | |||
168 | workspace->node.destroying = true; | 162 | workspace->node.destroying = true; |
169 | node_set_dirty(&workspace->node); | 163 | node_set_dirty(&workspace->node); |
170 | } | 164 | } |