diff options
-rw-r--r-- | sway/config/output.c | 4 | ||||
-rw-r--r-- | sway/tree/output.c | 5 |
2 files changed, 5 insertions, 4 deletions
diff --git a/sway/config/output.c b/sway/config/output.c index 7c2df6ec..f24e7d66 100644 --- a/sway/config/output.c +++ b/sway/config/output.c | |||
@@ -179,10 +179,6 @@ void apply_output_config(struct output_config *oc, struct sway_output *output) { | |||
179 | 179 | ||
180 | if (oc && oc->enabled == 0) { | 180 | if (oc && oc->enabled == 0) { |
181 | if (output->enabled) { | 181 | if (output->enabled) { |
182 | if (output->bg_pid != 0) { | ||
183 | terminate_swaybg(output->bg_pid); | ||
184 | output->bg_pid = 0; | ||
185 | } | ||
186 | output_disable(output); | 182 | output_disable(output); |
187 | wlr_output_layout_remove(root->output_layout, wlr_output); | 183 | wlr_output_layout_remove(root->output_layout, wlr_output); |
188 | } | 184 | } |
diff --git a/sway/tree/output.c b/sway/tree/output.c index 6ff95579..95ab9378 100644 --- a/sway/tree/output.c +++ b/sway/tree/output.c | |||
@@ -225,6 +225,11 @@ void output_disable(struct sway_output *output) { | |||
225 | 225 | ||
226 | root_for_each_container(untrack_output, output); | 226 | root_for_each_container(untrack_output, output); |
227 | 227 | ||
228 | if (output->bg_pid) { | ||
229 | terminate_swaybg(output->bg_pid); | ||
230 | output->bg_pid = 0; | ||
231 | } | ||
232 | |||
228 | int index = list_find(root->outputs, output); | 233 | int index = list_find(root->outputs, output); |
229 | list_del(root->outputs, index); | 234 | list_del(root->outputs, index); |
230 | 235 | ||