aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLibravatar Kenny Levinsen <kl@kl.wtf>2024-03-28 14:26:05 +0100
committerLibravatar Kenny Levinsen <kl@kl.wtf>2024-05-02 16:16:42 +0200
commit4c28916d685714a74048d798096a6f853bf61000 (patch)
treeaa1cb463e987c4fc5f51655260847f7c861ef9ff /include
parentconfig/output: Use all outputs for config merge (diff)
downloadsway-4c28916d685714a74048d798096a6f853bf61000.tar.gz
sway-4c28916d685714a74048d798096a6f853bf61000.tar.zst
sway-4c28916d685714a74048d798096a6f853bf61000.zip
config/output: Search for output config fallbacks
The original sway output config implementation enabled one output at a time, testing modes, render formats and VRR support as it went along. While this sort of fallback is easy to do, it has the downside of not considering the effect of neighbor outputs on the configuration viability. With backend-wide commits, we can now better consider the effect of neighbor outputs, but to handle the fact that we commit all outputs at once we need to perform a more elaborate search of viable configurations. Implement a recursive configuration search for when the primary configuration failed to apply.
Diffstat (limited to 'include')
-rw-r--r--include/sway/config.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/sway/config.h b/include/sway/config.h
index 0be1cd22..5ccc3e77 100644
--- a/include/sway/config.h
+++ b/include/sway/config.h
@@ -689,10 +689,13 @@ const char *sway_output_scale_filter_to_string(enum scale_filter_mode scale_filt
689struct output_config *new_output_config(const char *name); 689struct output_config *new_output_config(const char *name);
690 690
691bool apply_output_configs(struct matched_output_config *configs, 691bool apply_output_configs(struct matched_output_config *configs,
692 size_t configs_len, bool test_only); 692 size_t configs_len, bool test_only, bool degrade_to_off);
693 693
694void apply_all_output_configs(void); 694void apply_all_output_configs(void);
695 695
696void sort_output_configs_by_priority(struct matched_output_config *configs,
697 size_t configs_len);
698
696/** 699/**
697 * store_output_config stores a new output config. An output may be matched by 700 * store_output_config stores a new output config. An output may be matched by
698 * three different config types, in order of precedence: Identifier, name and 701 * three different config types, in order of precedence: Identifier, name and