aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Kenny Levinsen <kl@kl.wtf>2024-03-16 01:03:37 +0100
committerLibravatar Simon Ser <contact@emersion.fr>2024-03-28 10:45:20 +0100
commit56e97b7d60e3723f79fd972061191117bf544f08 (patch)
tree4c698e533d50e056bbb57e30fcc6fcc161a09f02
parentdesktop/output: Use apply_output_configs for output mgmt (diff)
downloadsway-56e97b7d60e3723f79fd972061191117bf544f08.tar.gz
sway-56e97b7d60e3723f79fd972061191117bf544f08.tar.zst
sway-56e97b7d60e3723f79fd972061191117bf544f08.zip
config/output: Remove apply_output_config
-rw-r--r--include/sway/config.h2
-rw-r--r--sway/config/output.c30
2 files changed, 0 insertions, 32 deletions
diff --git a/include/sway/config.h b/include/sway/config.h
index eff7cfbb..69b14446 100644
--- a/include/sway/config.h
+++ b/include/sway/config.h
@@ -690,8 +690,6 @@ struct output_config *new_output_config(const char *name);
690 690
691void merge_output_config(struct output_config *dst, struct output_config *src); 691void merge_output_config(struct output_config *dst, struct output_config *src);
692 692
693bool apply_output_config(struct output_config *oc, struct sway_output *output);
694
695bool apply_output_configs(struct matched_output_config *configs, 693bool apply_output_configs(struct matched_output_config *configs,
696 size_t configs_len, bool test_only); 694 size_t configs_len, bool test_only);
697 695
diff --git a/sway/config/output.c b/sway/config/output.c
index 5bf5bed5..cb12683d 100644
--- a/sway/config/output.c
+++ b/sway/config/output.c
@@ -568,36 +568,6 @@ static bool finalize_output_config(struct output_config *oc, struct sway_output
568 return true; 568 return true;
569} 569}
570 570
571bool apply_output_config(struct output_config *oc, struct sway_output *output) {
572 if (output == root->fallback_output) {
573 return false;
574 }
575
576 struct wlr_output_state pending = {0};
577 queue_output_config(oc, output, &pending);
578
579 sway_log(SWAY_DEBUG, "Committing output %s", output->wlr_output->name);
580 if (!wlr_output_commit_state(output->wlr_output, &pending)) {
581 // Failed to commit output changes, maybe the output is missing a CRTC.
582 // Leave the output disabled for now and try again when the output gets
583 // the mode we asked for.
584 sway_log(SWAY_ERROR, "Failed to commit output %s", output->wlr_output->name);
585 return false;
586 }
587
588 if (!finalize_output_config(oc, output)) {
589 return false;
590 }
591
592 // Reconfigure all devices, since input config may have been applied before
593 // this output came online, and some config items (like map_to_output) are
594 // dependent on an output being present.
595 input_manager_configure_all_input_mappings();
596 // Reconfigure the cursor images, since the scale may have changed.
597 input_manager_configure_xcursor();
598 return true;
599}
600
601bool test_output_config(struct output_config *oc, struct sway_output *output) { 571bool test_output_config(struct output_config *oc, struct sway_output *output) {
602 if (output == root->fallback_output) { 572 if (output == root->fallback_output) {
603 return false; 573 return false;