aboutsummaryrefslogtreecommitdiffstats
path: root/sway/config.c
diff options
context:
space:
mode:
authorLibravatar Brian Ashworth <bosrsf04@gmail.com>2019-04-03 21:53:43 -0400
committerLibravatar Simon Ser <contact@emersion.fr>2019-04-04 20:08:21 +0300
commit75e7bd24ccb9731065bb7f8313aa53ba11ddc420 (patch)
tree2522f31626a21b42c2496a32266eafd3b7d66f50 /sway/config.c
parentidle_inhibit: fix crash during view destruction (diff)
downloadsway-75e7bd24ccb9731065bb7f8313aa53ba11ddc420.tar.gz
sway-75e7bd24ccb9731065bb7f8313aa53ba11ddc420.tar.zst
sway-75e7bd24ccb9731065bb7f8313aa53ba11ddc420.zip
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.
Diffstat (limited to 'sway/config.c')
-rw-r--r--sway/config.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sway/config.c b/sway/config.c
index 7104f55d..d5bfe105 100644
--- a/sway/config.c
+++ b/sway/config.c
@@ -104,6 +104,9 @@ void free_config(struct sway_config *config) {
104 } 104 }
105 list_free(config->output_configs); 105 list_free(config->output_configs);
106 } 106 }
107 if (config->swaybg_client != NULL) {
108 wl_client_destroy(config->swaybg_client);
109 }
107 if (config->input_configs) { 110 if (config->input_configs) {
108 for (int i = 0; i < config->input_configs->length; i++) { 111 for (int i = 0; i < config->input_configs->length; i++) {
109 free_input_config(config->input_configs->items[i]); 112 free_input_config(config->input_configs->items[i]);
@@ -480,6 +483,7 @@ bool load_main_config(const char *file, bool is_active, bool validating) {
480 483
481 if (is_active) { 484 if (is_active) {
482 reset_outputs(); 485 reset_outputs();
486 spawn_swaybg();
483 487
484 config->reloading = false; 488 config->reloading = false;
485 if (config->swaynag_config_errors.pid > 0) { 489 if (config->swaynag_config_errors.pid > 0) {