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.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/sway/config/input.c b/sway/config/input.c
index a998e170..de3b21ed 100644
--- a/sway/config/input.c
+++ b/sway/config/input.c
@@ -1,4 +1,3 @@
1#define _POSIX_C_SOURCE 200809L
2#include <stdlib.h> 1#include <stdlib.h>
3#include <limits.h> 2#include <limits.h>
4#include <float.h> 3#include <float.h>
@@ -25,14 +24,17 @@ struct input_config *new_input_config(const char* identifier) {
25 input->drag = INT_MIN; 24 input->drag = INT_MIN;
26 input->drag_lock = INT_MIN; 25 input->drag_lock = INT_MIN;
27 input->dwt = INT_MIN; 26 input->dwt = INT_MIN;
27 input->dwtp = INT_MIN;
28 input->send_events = INT_MIN; 28 input->send_events = INT_MIN;
29 input->click_method = INT_MIN; 29 input->click_method = INT_MIN;
30 input->middle_emulation = INT_MIN; 30 input->middle_emulation = INT_MIN;
31 input->natural_scroll = INT_MIN; 31 input->natural_scroll = INT_MIN;
32 input->accel_profile = INT_MIN; 32 input->accel_profile = INT_MIN;
33 input->rotation_angle = FLT_MIN;
33 input->pointer_accel = FLT_MIN; 34 input->pointer_accel = FLT_MIN;
34 input->scroll_factor = FLT_MIN; 35 input->scroll_factor = FLT_MIN;
35 input->scroll_button = INT_MIN; 36 input->scroll_button = INT_MIN;
37 input->scroll_button_lock = INT_MIN;
36 input->scroll_method = INT_MIN; 38 input->scroll_method = INT_MIN;
37 input->left_handed = INT_MIN; 39 input->left_handed = INT_MIN;
38 input->repeat_delay = INT_MIN; 40 input->repeat_delay = INT_MIN;
@@ -61,6 +63,9 @@ void merge_input_config(struct input_config *dst, struct input_config *src) {
61 if (src->dwt != INT_MIN) { 63 if (src->dwt != INT_MIN) {
62 dst->dwt = src->dwt; 64 dst->dwt = src->dwt;
63 } 65 }
66 if (src->dwtp != INT_MIN) {
67 dst->dwtp = src->dwtp;
68 }
64 if (src->left_handed != INT_MIN) { 69 if (src->left_handed != INT_MIN) {
65 dst->left_handed = src->left_handed; 70 dst->left_handed = src->left_handed;
66 } 71 }
@@ -70,6 +75,9 @@ void merge_input_config(struct input_config *dst, struct input_config *src) {
70 if (src->natural_scroll != INT_MIN) { 75 if (src->natural_scroll != INT_MIN) {
71 dst->natural_scroll = src->natural_scroll; 76 dst->natural_scroll = src->natural_scroll;
72 } 77 }
78 if (src->rotation_angle != FLT_MIN) {
79 dst->rotation_angle = src->rotation_angle;
80 }
73 if (src->pointer_accel != FLT_MIN) { 81 if (src->pointer_accel != FLT_MIN) {
74 dst->pointer_accel = src->pointer_accel; 82 dst->pointer_accel = src->pointer_accel;
75 } 83 }
@@ -88,6 +96,9 @@ void merge_input_config(struct input_config *dst, struct input_config *src) {
88 if (src->scroll_button != INT_MIN) { 96 if (src->scroll_button != INT_MIN) {
89 dst->scroll_button = src->scroll_button; 97 dst->scroll_button = src->scroll_button;
90 } 98 }
99 if (src->scroll_button_lock != INT_MIN) {
100 dst->scroll_button_lock = src->scroll_button_lock;
101 }
91 if (src->send_events != INT_MIN) { 102 if (src->send_events != INT_MIN) {
92 dst->send_events = src->send_events; 103 dst->send_events = src->send_events;
93 } 104 }