diff options
author | Kenny Levinsen <kl@kl.wtf> | 2024-03-16 00:48:56 +0100 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2024-03-28 10:45:20 +0100 |
commit | 3e03eb3a017d144137dbe6591891f3a51a61dea0 (patch) | |
tree | 571828cfe9eb98fe524dc55ce115111aa24dbb9b /include | |
parent | config/output: Split apply_output_config (diff) | |
download | sway-3e03eb3a017d144137dbe6591891f3a51a61dea0.tar.gz sway-3e03eb3a017d144137dbe6591891f3a51a61dea0.tar.zst sway-3e03eb3a017d144137dbe6591891f3a51a61dea0.zip |
config/output: Introduce apply_output_configs
Introduce apply_output_configs, which applies the specified matched
output configs as a single backend commit.
Reimplement apply_output_config_to_outputs using apply_output_configs.
Diffstat (limited to 'include')
-rw-r--r-- | include/sway/config.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/sway/config.h b/include/sway/config.h index f9da1967..d23fe578 100644 --- a/include/sway/config.h +++ b/include/sway/config.h | |||
@@ -292,6 +292,14 @@ struct output_config { | |||
292 | }; | 292 | }; |
293 | 293 | ||
294 | /** | 294 | /** |
295 | * An output config pre-matched to an output | ||
296 | */ | ||
297 | struct matched_output_config { | ||
298 | struct sway_output *output; | ||
299 | struct output_config *config; | ||
300 | }; | ||
301 | |||
302 | /** | ||
295 | * Stores size of gaps for each side | 303 | * Stores size of gaps for each side |
296 | */ | 304 | */ |
297 | struct side_gaps { | 305 | struct side_gaps { |
@@ -684,6 +692,9 @@ void merge_output_config(struct output_config *dst, struct output_config *src); | |||
684 | 692 | ||
685 | bool apply_output_config(struct output_config *oc, struct sway_output *output); | 693 | bool apply_output_config(struct output_config *oc, struct sway_output *output); |
686 | 694 | ||
695 | bool apply_output_configs(struct matched_output_config *configs, | ||
696 | size_t configs_len, bool test_only); | ||
697 | |||
687 | bool test_output_config(struct output_config *oc, struct sway_output *output); | 698 | bool test_output_config(struct output_config *oc, struct sway_output *output); |
688 | 699 | ||
689 | struct output_config *store_output_config(struct output_config *oc); | 700 | struct output_config *store_output_config(struct output_config *oc); |