aboutsummaryrefslogtreecommitdiff
path: root/sway/config.c
diff options
context:
space:
mode:
authorChristoph Gysin <christoph.gysin@gmail.com>2015-11-29 14:51:42 +0200
committerChristoph Gysin <christoph.gysin@gmail.com>2015-11-29 15:29:06 +0200
commit7d82cd9c0a418385fbde72f4503459ab7afa1bde (patch)
treed82e43a424ccde83f5ced21c79b2d6b519f62bd1 /sway/config.c
parent88f372a22adab3c7a7b088d9d400066ed9c7b1af (diff)
cmd_output: Use list_seq_find() to find matching config
Diffstat (limited to 'sway/config.c')
-rw-r--r--sway/config.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/sway/config.c b/sway/config.c
index e9785aba..bb9142c0 100644
--- a/sway/config.c
+++ b/sway/config.c
@@ -261,6 +261,14 @@ bool read_config(FILE *file, bool is_active) {
return success;
}
+int output_name_cmp(const void *item, const void *data)
+{
+ const struct output_config *output = item;
+ const char *name = data;
+
+ return strcmp(output->name, name);
+}
+
void apply_output_config(struct output_config *oc, swayc_t *output) {
if (oc && oc->width > 0 && oc->height > 0) {
output->width = oc->width;