From eaec82abd20ebe847bdf17f28b0667b449a3f0bc Mon Sep 17 00:00:00 2001 From: emersion Date: Sat, 16 Feb 2019 23:30:19 +0100 Subject: 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. --- sway/desktop/output.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sway/desktop/output.c') 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) { wl_list_remove(&output->present.link); wl_list_remove(&output->damage_destroy.link); wl_list_remove(&output->damage_frame.link); + wl_list_remove(&output->swaybg_client_destroy.link); transaction_commit_dirty(); } @@ -612,6 +613,7 @@ void handle_new_output(struct wl_listener *listener, void *data) { output->damage_frame.notify = damage_handle_frame; wl_signal_add(&output->damage->events.destroy, &output->damage_destroy); output->damage_destroy.notify = damage_handle_destroy; + wl_list_init(&output->swaybg_client_destroy.link); struct output_config *oc = output_find_config(output); if (!oc || oc->enabled) { -- cgit v1.2.3-54-g00ecf