aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorFurkan Sahin <furkan-dev@proton.me>2024-03-28 14:26:05 +0100
committerFurkan Sahin <furkan-dev@proton.me>2024-03-28 14:26:05 +0100
commit9f561158a62d0dadba28eaab32f24d2e2d46158e (patch)
treeaa1cb463e987c4fc5f51655260847f7c861ef9ff /include
parentc5fbb3e99a39f8e612c8335e73f9df10a813e6bb (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