aboutsummaryrefslogtreecommitdiffstats
path: root/sway/config/input.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/config/input.c')
-rw-r--r--sway/config/input.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/sway/config/input.c b/sway/config/input.c
index 17303ccc..8d687a6d 100644
--- a/sway/config/input.c
+++ b/sway/config/input.c
@@ -8,17 +8,18 @@
8struct input_config *new_input_config(const char* identifier) { 8struct input_config *new_input_config(const char* identifier) {
9 struct input_config *input = calloc(1, sizeof(struct input_config)); 9 struct input_config *input = calloc(1, sizeof(struct input_config));
10 if (!input) { 10 if (!input) {
11 wlr_log(L_DEBUG, "Unable to allocate input config"); 11 wlr_log(WLR_DEBUG, "Unable to allocate input config");
12 return NULL; 12 return NULL;
13 } 13 }
14 wlr_log(L_DEBUG, "new_input_config(%s)", identifier); 14 wlr_log(WLR_DEBUG, "new_input_config(%s)", identifier);
15 if (!(input->identifier = strdup(identifier))) { 15 if (!(input->identifier = strdup(identifier))) {
16 free(input); 16 free(input);
17 wlr_log(L_DEBUG, "Unable to allocate input config"); 17 wlr_log(WLR_DEBUG, "Unable to allocate input config");
18 return NULL; 18 return NULL;
19 } 19 }
20 20
21 input->tap = INT_MIN; 21 input->tap = INT_MIN;
22 input->tap_button_map = INT_MIN;
22 input->drag_lock = INT_MIN; 23 input->drag_lock = INT_MIN;
23 input->dwt = INT_MIN; 24 input->dwt = INT_MIN;
24 input->send_events = INT_MIN; 25 input->send_events = INT_MIN;
@@ -27,6 +28,7 @@ struct input_config *new_input_config(const char* identifier) {
27 input->natural_scroll = INT_MIN; 28 input->natural_scroll = INT_MIN;
28 input->accel_profile = INT_MIN; 29 input->accel_profile = INT_MIN;
29 input->pointer_accel = FLT_MIN; 30 input->pointer_accel = FLT_MIN;
31 input->scroll_button = INT_MIN;
30 input->scroll_method = INT_MIN; 32 input->scroll_method = INT_MIN;
31 input->left_handed = INT_MIN; 33 input->left_handed = INT_MIN;
32 input->repeat_delay = INT_MIN; 34 input->repeat_delay = INT_MIN;
@@ -70,12 +72,18 @@ void merge_input_config(struct input_config *dst, struct input_config *src) {
70 if (src->scroll_method != INT_MIN) { 72 if (src->scroll_method != INT_MIN) {
71 dst->scroll_method = src->scroll_method; 73 dst->scroll_method = src->scroll_method;
72 } 74 }
75 if (src->scroll_button != INT_MIN) {
76 dst->scroll_button = src->scroll_button;
77 }
73 if (src->send_events != INT_MIN) { 78 if (src->send_events != INT_MIN) {
74 dst->send_events = src->send_events; 79 dst->send_events = src->send_events;
75 } 80 }
76 if (src->tap != INT_MIN) { 81 if (src->tap != INT_MIN) {
77 dst->tap = src->tap; 82 dst->tap = src->tap;
78 } 83 }
84 if (src->tap_button_map != INT_MIN) {
85 dst->tap_button_map = src->tap_button_map;
86 }
79 if (src->xkb_layout) { 87 if (src->xkb_layout) {
80 free(dst->xkb_layout); 88 free(dst->xkb_layout);
81 dst->xkb_layout = strdup(src->xkb_layout); 89 dst->xkb_layout = strdup(src->xkb_layout);
@@ -112,7 +120,7 @@ void merge_input_config(struct input_config *dst, struct input_config *src) {
112struct input_config *copy_input_config(struct input_config *ic) { 120struct input_config *copy_input_config(struct input_config *ic) {
113 struct input_config *copy = calloc(1, sizeof(struct input_config)); 121 struct input_config *copy = calloc(1, sizeof(struct input_config));
114 if (copy == NULL) { 122 if (copy == NULL) {
115 wlr_log(L_ERROR, "could not allocate input config"); 123 wlr_log(WLR_ERROR, "could not allocate input config");
116 return NULL; 124 return NULL;
117 } 125 }
118 merge_input_config(copy, ic); 126 merge_input_config(copy, ic);