aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorKenny Levinsen <kl@kl.wtf>2024-03-28 14:26:05 +0100
committerKenny Levinsen <kl@kl.wtf>2024-05-02 16:16:42 +0200
commit4c28916d685714a74048d798096a6f853bf61000 (patch)
treeaa1cb463e987c4fc5f51655260847f7c861ef9ff /include
parentee5c4f38c9db849b6c4034e792b451eb8d6d2627 (diff)
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
struct output_config *new_output_config(const char *name);
bool apply_output_configs(struct matched_output_config *configs,
- size_t configs_len, bool test_only);
+ size_t configs_len, bool test_only, bool degrade_to_off);
void apply_all_output_configs(void);
+void sort_output_configs_by_priority(struct matched_output_config *configs,
+ size_t configs_len);
+
/**
* store_output_config stores a new output config. An output may be matched by
* three different config types, in order of precedence: Identifier, name and