aboutsummaryrefslogtreecommitdiff
path: root/include/sway
diff options
context:
space:
mode:
authorBrian Ashworth <bosrsf04@gmail.com>2019-03-15 15:09:55 -0400
committerDrew DeVault <sir@cmpwn.com>2019-03-16 10:40:46 -0600
commit3106ef23a7b4f7f7efeb43d47e724f5b23c4fd78 (patch)
tree82335e0f8877d291a36e3c67f8cfefe07bbdde56 /include/sway
parent2578669de76c6d4b2038a648d1cfcd3c7e9e320a (diff)
Fix output config retrieval for new outputs
This removes `output_find_config`, which would take the first matching output config it found. This is fine if only a name output config, identifier output config, or even just wildcard exist, but if there is a name output config and identifier output config, they are not merged. Instead, this introduces find_output_config, which is just a wrapper for `get_output_config`. This ensures that both the name and identifier output configs are respected. This fixes the following case: - For simplicity in this example, remove all output configs from config - Run `swaymsg output <name> bg #ff0000 solid_color` - Run `swaymsg output <identifier> scale 2` - Disconnect and reconnect output Without this, the output will have the background, but not the scale. With this, the output will have both the background and scale
Diffstat (limited to 'include/sway')
-rw-r--r--include/sway/config.h2
-rw-r--r--include/sway/output.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/include/sway/config.h b/include/sway/config.h
index 46ca7cee..7c544541 100644
--- a/include/sway/config.h
+++ b/include/sway/config.h
@@ -585,6 +585,8 @@ bool apply_output_config(struct output_config *oc, struct sway_output *output);
struct output_config *store_output_config(struct output_config *oc);
+struct output_config *find_output_config(struct sway_output *output);
+
void apply_output_config_to_outputs(struct output_config *oc);
void reset_outputs(void);
diff --git a/include/sway/output.h b/include/sway/output.h
index 32ed1e28..8015f211 100644
--- a/include/sway/output.h
+++ b/include/sway/output.h
@@ -88,8 +88,6 @@ struct sway_output *output_by_name_or_id(const char *name_or_id);
void output_sort_workspaces(struct sway_output *output);
-struct output_config *output_find_config(struct sway_output *output);
-
void output_enable(struct sway_output *output, struct output_config *oc);
void output_disable(struct sway_output *output);