aboutsummaryrefslogtreecommitdiff
path: root/sway/config
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2018-04-26 12:32:10 +0200
committerGitHub <noreply@github.com>2018-04-26 12:32:10 +0200
commit64e0731cc7206e8becfe6f80bc58362aa53f07b6 (patch)
tree3736887591d8464f577d2ad4a753a404d38d77ae /sway/config
parentd94bb78ff3ade39cc848d0acfd571b9ac6917868 (diff)
parentff61df17ffd358b03663a35fe7140e51e1ee98fc (diff)
Merge pull request #1860 from emersion/input-map-from
Add map_from_region command
Diffstat (limited to 'sway/config')
-rw-r--r--sway/config/input.c13
1 files changed, 10 insertions, 3 deletions
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);
}
}