aboutsummaryrefslogtreecommitdiff
path: root/sway/tree
diff options
context:
space:
mode:
authorBrian Ashworth <bosrsf04@gmail.com>2018-12-19 03:21:41 -0500
committeremersion <contact@emersion.fr>2018-12-19 09:24:15 +0100
commit477bca5e288cc3155c536265272490b413328778 (patch)
treedf9714ab3c029e61639aa4f38e73fafaadbb91df /sway/tree
parent3a4f4f5d6699d064845f715a849a6ab824a734b6 (diff)
Terminate swaybg in output_disable
Moves the call to `terminate_swaybg` from inside `apply_output_config` to `output_disable`. The former was only called when an output was being disabled. The latter is called when an output is being disabled and when an output becomes disconnected. Without this, disconnecting an enabled output would result in a defunct swaybg process.
Diffstat (limited to 'sway/tree')
-rw-r--r--sway/tree/output.c5
1 files changed, 5 insertions, 0 deletions
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) {
root_for_each_container(untrack_output, output);
+ if (output->bg_pid) {
+ terminate_swaybg(output->bg_pid);
+ output->bg_pid = 0;
+ }
+
int index = list_find(root->outputs, output);
list_del(root->outputs, index);