output/config: Make output config utils private

These had to be exposed when the output manager would handle state
directly, but with the temporarily stored state this is no longer
required.
This commit is contained in:
Kenny Levinsen 2024-09-05 18:31:16 +02:00
parent 9092e0f755
commit 429dba6df0
2 changed files with 7 additions and 16 deletions

View file

@ -296,14 +296,6 @@ struct output_config {
char *background_fallback;
};
/**
* An output config pre-matched to an output
*/
struct matched_output_config {
struct sway_output *output;
struct output_config *config;
};
/**
* Stores size of gaps for each side
*/
@ -693,14 +685,8 @@ 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, bool degrade_to_off);
bool apply_all_output_configs(bool test_only, bool degrade_to_off);
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

View file

@ -666,6 +666,11 @@ static bool config_has_manual_mode(struct output_config *oc) {
return false;
}
struct matched_output_config {
struct sway_output *output;
struct output_config *config;
};
struct search_context {
struct wlr_output_swapchain_manager *swapchain_mgr;
struct wlr_backend_output_state *states;
@ -884,12 +889,12 @@ static int compare_matched_output_config_priority(const void *a, const void *b)
return 0;
}
void sort_output_configs_by_priority(struct matched_output_config *configs,
static void sort_output_configs_by_priority(struct matched_output_config *configs,
size_t configs_len) {
qsort(configs, configs_len, sizeof(*configs), compare_matched_output_config_priority);
}
bool apply_output_configs(struct matched_output_config *configs,
static bool apply_output_configs(struct matched_output_config *configs,
size_t configs_len, bool test_only, bool degrade_to_off) {
struct wlr_backend_output_state *states = calloc(configs_len, sizeof(*states));
if (!states) {