From ff61df17ffd358b03663a35fe7140e51e1ee98fc Mon Sep 17 00:00:00 2001 From: emersion Date: Tue, 24 Apr 2018 19:39:29 +0100 Subject: Add map_from_region command --- sway/config/input.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'sway/config') diff --git a/sway/config/input.c b/sway/config/input.c index a9f20723..17303ccc 100644 --- a/sway/config/input.c +++ b/sway/config/input.c @@ -96,9 +96,16 @@ void merge_input_config(struct input_config *dst, struct input_config *src) { free(dst->xkb_variant); dst->xkb_variant = strdup(src->xkb_variant); } - if (src->mapped_output) { - free(dst->mapped_output); - dst->mapped_output = strdup(src->mapped_output); + if (src->mapped_from_region) { + free(dst->mapped_from_region); + dst->mapped_from_region = + malloc(sizeof(struct input_config_mapped_from_region)); + memcpy(dst->mapped_from_region, src->mapped_from_region, + sizeof(struct input_config_mapped_from_region)); + } + if (src->mapped_to_output) { + free(dst->mapped_to_output); + dst->mapped_to_output = strdup(src->mapped_to_output); } } -- cgit v1.2.3