diff options
author | emersion <contact@emersion.fr> | 2019-02-16 23:30:19 +0100 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2019-02-18 15:11:48 -0500 |
commit | eaec82abd20ebe847bdf17f28b0667b449a3f0bc (patch) | |
tree | 660d51aded919c466e43eede10dc30789fbd0e01 /sway/tree/output.c | |
parent | Fix Meson subproject boolean default options (diff) | |
download | sway-eaec82abd20ebe847bdf17f28b0667b449a3f0bc.tar.gz sway-eaec82abd20ebe847bdf17f28b0667b449a3f0bc.tar.zst sway-eaec82abd20ebe847bdf17f28b0667b449a3f0bc.zip |
Disconnect swaybg instead of killing it
This is much more reliable. This also fixes race conditions when killing swaybg
while it's doing a wl_display_roundtrip.
Diffstat (limited to 'sway/tree/output.c')
-rw-r--r-- | sway/tree/output.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sway/tree/output.c b/sway/tree/output.c index 138144a7..60e0af9f 100644 --- a/sway/tree/output.c +++ b/sway/tree/output.c | |||
@@ -233,9 +233,8 @@ void output_disable(struct sway_output *output) { | |||
233 | 233 | ||
234 | root_for_each_container(untrack_output, output); | 234 | root_for_each_container(untrack_output, output); |
235 | 235 | ||
236 | if (output->bg_pid) { | 236 | if (output->swaybg_client != NULL) { |
237 | terminate_swaybg(output->bg_pid); | 237 | wl_client_destroy(output->swaybg_client); |
238 | output->bg_pid = 0; | ||
239 | } | 238 | } |
240 | 239 | ||
241 | int index = list_find(root->outputs, output); | 240 | int index = list_find(root->outputs, output); |