diff options
| author | Kenny Levinsen <kl@kl.wtf> | 2024-03-16 01:00:46 +0100 |
|---|---|---|
| committer | Simon Ser <contact@emersion.fr> | 2024-03-28 10:45:20 +0100 |
| commit | 98be797356876153e74405dbef36e3e71875ca2e (patch) | |
| tree | fd9b8f3f4283e854efe9a31168b8d8e1cd201423 | |
| parent | 923f642b704022442cc3245a2fa13278341c14e0 (diff) | |
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.
| -rw-r--r-- | sway/commands/output.c | 4 | ||||
| -rw-r--r-- | sway/desktop/output.c | 8 |
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) { bool background = output->background; - output = store_output_config(output); + store_output_config(output); // If reloading, the output configs will be applied after reading the // entire config and before the deferred commands so that an auto generated // workspace name is not given to re-enabled outputs. if (!config->reloading && !config->validating) { - apply_output_config_to_outputs(output); + apply_all_output_configs(); if (background) { if (!spawn_swaybg()) { 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) { sway_session_lock_add_output(server->session_lock.lock, output); } - struct output_config *oc = find_output_config(output); - apply_output_config(oc, output); - free_output_config(oc); + apply_all_output_configs(); transaction_commit_dirty(); @@ -652,6 +650,6 @@ void handle_output_power_manager_set_mode(struct wl_listener *listener, oc->power = 1; break; } - oc = store_output_config(oc); - apply_output_config(oc, output); + store_output_config(oc); + apply_all_output_configs(); } |
