aboutsummaryrefslogtreecommitdiff
path: root/sway/config/input.c
diff options
context:
space:
mode:
authorTadeo Kondrak <me@tadeo.ca>2019-10-28 18:26:00 -0600
committerSimon Ser <contact@emersion.fr>2019-11-17 13:34:24 +0100
commit4829f1c26a521a4ef6659d91505112cc0be8d237 (patch)
tree4e0987c668241600401755630afe40c3879ca06a /sway/config/input.c
parentdf1a0468756b4a6d68cc5904313c4630edf14dd1 (diff)
Implement input map_to_region command
Diffstat (limited to 'sway/config/input.c')
-rw-r--r--sway/config/input.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/sway/config/input.c b/sway/config/input.c
index ad4a64ee..294ed08f 100644
--- a/sway/config/input.c
+++ b/sway/config/input.c
@@ -138,6 +138,13 @@ void merge_input_config(struct input_config *dst, struct input_config *src) {
free(dst->mapped_to_output);
dst->mapped_to_output = strdup(src->mapped_to_output);
}
+ if (src->mapped_to_region) {
+ free(dst->mapped_to_region);
+ dst->mapped_to_region =
+ malloc(sizeof(struct wlr_box));
+ memcpy(dst->mapped_to_region, src->mapped_to_region,
+ sizeof(struct wlr_box));
+ }
if (src->calibration_matrix.configured) {
dst->calibration_matrix.configured = src->calibration_matrix.configured;
memcpy(dst->calibration_matrix.matrix, src->calibration_matrix.matrix,
@@ -323,6 +330,7 @@ void free_input_config(struct input_config *ic) {
free(ic->xkb_variant);
free(ic->mapped_from_region);
free(ic->mapped_to_output);
+ free(ic->mapped_to_region);
free(ic);
}