swaybg: one instance for all outputs

This makes it so there will only be one swaybg instance running
instead of one per output. swaybg's cli has been changed to a xrandr
like interface, where you select an output and then change properties
for that output and then select another output and repeat. This also
makes it so swaybg is only killed and respawned when a background
changes or when reloading.
This commit is contained in:
Brian Ashworth 2019-04-03 21:53:43 -04:00 committed by Simon Ser
parent 0ad905f23c
commit 75e7bd24cc
8 changed files with 497 additions and 251 deletions

View file

@ -525,7 +525,6 @@ 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();
}
@ -632,7 +631,6 @@ 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 = find_output_config(output);
if (!oc || oc->enabled) {