aboutsummaryrefslogtreecommitdiffstats
path: root/sway
diff options
context:
space:
mode:
authorLibravatar Kenny Levinsen <kl@kl.wtf>2024-03-16 01:00:46 +0100
committerLibravatar Simon Ser <contact@emersion.fr>2024-03-28 10:45:20 +0100
commit98be797356876153e74405dbef36e3e71875ca2e (patch)
treefd9b8f3f4283e854efe9a31168b8d8e1cd201423 /sway
parentoutput/config: Add apply_all_output_configs (diff)
downloadsway-98be797356876153e74405dbef36e3e71875ca2e.tar.gz
sway-98be797356876153e74405dbef36e3e71875ca2e.tar.zst
sway-98be797356876153e74405dbef36e3e71875ca2e.zip
Use apply_all_output_configs to light up outputs
This allows us to test and if necessary degrade the entire backend configuration to light everything up.
Diffstat (limited to 'sway')
-rw-r--r--sway/commands/output.c4
-rw-r--r--sway/desktop/output.c8
2 files changed, 5 insertions, 7 deletions
diff --git a/sway/commands/output.c b/sway/commands/output.c
index 462dffd2..5e5d31b3 100644
--- a/sway/commands/output.c
+++ b/sway/commands/output.c
@@ -103,13 +103,13 @@ struct cmd_results *cmd_output(int argc, char **argv) {
103 103
104 bool background = output->background; 104 bool background = output->background;
105 105
106 output = store_output_config(output); 106 store_output_config(output);
107 107
108 // If reloading, the output configs will be applied after reading the 108 // If reloading, the output configs will be applied after reading the
109 // entire config and before the deferred commands so that an auto generated 109 // entire config and before the deferred commands so that an auto generated
110 // workspace name is not given to re-enabled outputs. 110 // workspace name is not given to re-enabled outputs.
111 if (!config->reloading && !config->validating) { 111 if (!config->reloading && !config->validating) {
112 apply_output_config_to_outputs(output); 112 apply_all_output_configs();
113 if (background) { 113 if (background) {
114 if (!spawn_swaybg()) { 114 if (!spawn_swaybg()) {
115 return cmd_results_new(CMD_FAILURE, 115 return cmd_results_new(CMD_FAILURE,
diff --git a/sway/desktop/output.c b/sway/desktop/output.c
index b8f2d32d..b2647219 100644
--- a/sway/desktop/output.c
+++ b/sway/desktop/output.c
@@ -521,9 +521,7 @@ void handle_new_output(struct wl_listener *listener, void *data) {
521 sway_session_lock_add_output(server->session_lock.lock, output); 521 sway_session_lock_add_output(server->session_lock.lock, output);
522 } 522 }
523 523
524 struct output_config *oc = find_output_config(output); 524 apply_all_output_configs();
525 apply_output_config(oc, output);
526 free_output_config(oc);
527 525
528 transaction_commit_dirty(); 526 transaction_commit_dirty();
529 527
@@ -652,6 +650,6 @@ void handle_output_power_manager_set_mode(struct wl_listener *listener,
652 oc->power = 1; 650 oc->power = 1;
653 break; 651 break;
654 } 652 }
655 oc = store_output_config(oc); 653 store_output_config(oc);
656 apply_output_config(oc, output); 654 apply_all_output_configs();
657} 655}