aboutsummaryrefslogtreecommitdiffstats
path: root/sway/desktop/output.c
diff options
context:
space:
mode:
authorLibravatar emersion <contact@emersion.fr>2019-02-16 23:30:19 +0100
committerLibravatar Drew DeVault <sir@cmpwn.com>2019-02-18 15:11:48 -0500
commiteaec82abd20ebe847bdf17f28b0667b449a3f0bc (patch)
tree660d51aded919c466e43eede10dc30789fbd0e01 /sway/desktop/output.c
parentFix Meson subproject boolean default options (diff)
downloadsway-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/desktop/output.c')
-rw-r--r--sway/desktop/output.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sway/desktop/output.c b/sway/desktop/output.c
index ad75bb35..c5461ee6 100644
--- a/sway/desktop/output.c
+++ b/sway/desktop/output.c
@@ -506,6 +506,7 @@ static void handle_destroy(struct wl_listener *listener, void *data) {
506 wl_list_remove(&output->present.link); 506 wl_list_remove(&output->present.link);
507 wl_list_remove(&output->damage_destroy.link); 507 wl_list_remove(&output->damage_destroy.link);
508 wl_list_remove(&output->damage_frame.link); 508 wl_list_remove(&output->damage_frame.link);
509 wl_list_remove(&output->swaybg_client_destroy.link);
509 510
510 transaction_commit_dirty(); 511 transaction_commit_dirty();
511} 512}
@@ -612,6 +613,7 @@ void handle_new_output(struct wl_listener *listener, void *data) {
612 output->damage_frame.notify = damage_handle_frame; 613 output->damage_frame.notify = damage_handle_frame;
613 wl_signal_add(&output->damage->events.destroy, &output->damage_destroy); 614 wl_signal_add(&output->damage->events.destroy, &output->damage_destroy);
614 output->damage_destroy.notify = damage_handle_destroy; 615 output->damage_destroy.notify = damage_handle_destroy;
616 wl_list_init(&output->swaybg_client_destroy.link);
615 617
616 struct output_config *oc = output_find_config(output); 618 struct output_config *oc = output_find_config(output);
617 if (!oc || oc->enabled) { 619 if (!oc || oc->enabled) {