Add map_from_region command

This commit is contained in:
emersion 2018-04-24 19:39:29 +01:00
parent d94bb78ff3
commit ff61df17ff
No known key found for this signature in database
GPG key ID: 0FDE7BE0E88F5E48
11 changed files with 160 additions and 25 deletions

View file

@ -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);
}
}