diff options
author | Tony Crisci <tony@dubstepdish.com> | 2018-04-02 11:44:42 -0400 |
---|---|---|
committer | Tony Crisci <tony@dubstepdish.com> | 2018-04-02 11:44:42 -0400 |
commit | a82c107c7613548a3ae0e75bb951ba57b7d2f22b (patch) | |
tree | c98359e87642355925dc1dda415aeebb1a01e071 /sway/input/input-manager.c | |
parent | dont copy seat config on the seat (diff) | |
download | sway-a82c107c7613548a3ae0e75bb951ba57b7d2f22b.tar.gz sway-a82c107c7613548a3ae0e75bb951ba57b7d2f22b.tar.zst sway-a82c107c7613548a3ae0e75bb951ba57b7d2f22b.zip |
80col
Diffstat (limited to 'sway/input/input-manager.c')
-rw-r--r-- | sway/input/input-manager.c | 45 |
1 files changed, 30 insertions, 15 deletions
diff --git a/sway/input/input-manager.c b/sway/input/input-manager.c index d9d20200..34d5b4cf 100644 --- a/sway/input/input-manager.c +++ b/sway/input/input-manager.c | |||
@@ -92,7 +92,8 @@ static bool input_has_seat_configuration(struct sway_input_manager *input) { | |||
92 | return false; | 92 | return false; |
93 | } | 93 | } |
94 | 94 | ||
95 | static void input_manager_libinput_config_pointer(struct sway_input_device *input_device) { | 95 | static void input_manager_libinput_config_pointer( |
96 | struct sway_input_device *input_device) { | ||
96 | struct wlr_input_device *wlr_device = input_device->wlr_device; | 97 | struct wlr_input_device *wlr_device = input_device->wlr_device; |
97 | struct input_config *ic = input_device->config; | 98 | struct input_config *ic = input_device->config; |
98 | struct libinput_device *libinput_device; | 99 | struct libinput_device *libinput_device; |
@@ -102,22 +103,27 @@ static void input_manager_libinput_config_pointer(struct sway_input_device *inpu | |||
102 | } | 103 | } |
103 | 104 | ||
104 | libinput_device = wlr_libinput_get_device_handle(wlr_device); | 105 | libinput_device = wlr_libinput_get_device_handle(wlr_device); |
105 | wlr_log(L_DEBUG, "input_manager_libinput_config_pointer(%s)", ic->identifier); | 106 | wlr_log(L_DEBUG, "input_manager_libinput_config_pointer(%s)", |
107 | ic->identifier); | ||
106 | 108 | ||
107 | if (ic->accel_profile != INT_MIN) { | 109 | if (ic->accel_profile != INT_MIN) { |
108 | wlr_log(L_DEBUG, "libinput_config_pointer(%s) accel_set_profile(%d)", | 110 | wlr_log(L_DEBUG, "libinput_config_pointer(%s) accel_set_profile(%d)", |
109 | ic->identifier, ic->accel_profile); | 111 | ic->identifier, ic->accel_profile); |
110 | libinput_device_config_accel_set_profile(libinput_device, ic->accel_profile); | 112 | libinput_device_config_accel_set_profile(libinput_device, |
113 | ic->accel_profile); | ||
111 | } | 114 | } |
112 | if (ic->click_method != INT_MIN) { | 115 | if (ic->click_method != INT_MIN) { |
113 | wlr_log(L_DEBUG, "libinput_config_pointer(%s) click_set_method(%d)", | 116 | wlr_log(L_DEBUG, "libinput_config_pointer(%s) click_set_method(%d)", |
114 | ic->identifier, ic->click_method); | 117 | ic->identifier, ic->click_method); |
115 | libinput_device_config_click_set_method(libinput_device, ic->click_method); | 118 | libinput_device_config_click_set_method(libinput_device, |
119 | ic->click_method); | ||
116 | } | 120 | } |
117 | if (ic->drag_lock != INT_MIN) { | 121 | if (ic->drag_lock != INT_MIN) { |
118 | wlr_log(L_DEBUG, "libinput_config_pointer(%s) tap_set_drag_lock_enabled(%d)", | 122 | wlr_log(L_DEBUG, |
123 | "libinput_config_pointer(%s) tap_set_drag_lock_enabled(%d)", | ||
119 | ic->identifier, ic->click_method); | 124 | ic->identifier, ic->click_method); |
120 | libinput_device_config_tap_set_drag_lock_enabled(libinput_device, ic->drag_lock); | 125 | libinput_device_config_tap_set_drag_lock_enabled(libinput_device, |
126 | ic->drag_lock); | ||
121 | } | 127 | } |
122 | if (ic->dwt != INT_MIN) { | 128 | if (ic->dwt != INT_MIN) { |
123 | wlr_log(L_DEBUG, "libinput_config_pointer(%s) dwt_set_enabled(%d)", | 129 | wlr_log(L_DEBUG, "libinput_config_pointer(%s) dwt_set_enabled(%d)", |
@@ -125,34 +131,43 @@ static void input_manager_libinput_config_pointer(struct sway_input_device *inpu | |||
125 | libinput_device_config_dwt_set_enabled(libinput_device, ic->dwt); | 131 | libinput_device_config_dwt_set_enabled(libinput_device, ic->dwt); |
126 | } | 132 | } |
127 | if (ic->left_handed != INT_MIN) { | 133 | if (ic->left_handed != INT_MIN) { |
128 | wlr_log(L_DEBUG, "libinput_config_pointer(%s) left_handed_set_enabled(%d)", | 134 | wlr_log(L_DEBUG, |
135 | "libinput_config_pointer(%s) left_handed_set_enabled(%d)", | ||
129 | ic->identifier, ic->left_handed); | 136 | ic->identifier, ic->left_handed); |
130 | libinput_device_config_left_handed_set(libinput_device, ic->left_handed); | 137 | libinput_device_config_left_handed_set(libinput_device, |
138 | ic->left_handed); | ||
131 | } | 139 | } |
132 | if (ic->middle_emulation != INT_MIN) { | 140 | if (ic->middle_emulation != INT_MIN) { |
133 | wlr_log(L_DEBUG, "libinput_config_pointer(%s) middle_emulation_set_enabled(%d)", | 141 | wlr_log(L_DEBUG, |
142 | "libinput_config_pointer(%s) middle_emulation_set_enabled(%d)", | ||
134 | ic->identifier, ic->middle_emulation); | 143 | ic->identifier, ic->middle_emulation); |
135 | libinput_device_config_middle_emulation_set_enabled(libinput_device, ic->middle_emulation); | 144 | libinput_device_config_middle_emulation_set_enabled(libinput_device, |
145 | ic->middle_emulation); | ||
136 | } | 146 | } |
137 | if (ic->natural_scroll != INT_MIN) { | 147 | if (ic->natural_scroll != INT_MIN) { |
138 | wlr_log(L_DEBUG, "libinput_config_pointer(%s) natural_scroll_set_enabled(%d)", | 148 | wlr_log(L_DEBUG, |
149 | "libinput_config_pointer(%s) natural_scroll_set_enabled(%d)", | ||
139 | ic->identifier, ic->natural_scroll); | 150 | ic->identifier, ic->natural_scroll); |
140 | libinput_device_config_scroll_set_natural_scroll_enabled(libinput_device, ic->natural_scroll); | 151 | libinput_device_config_scroll_set_natural_scroll_enabled( |
152 | libinput_device, ic->natural_scroll); | ||
141 | } | 153 | } |
142 | if (ic->pointer_accel != FLT_MIN) { | 154 | if (ic->pointer_accel != FLT_MIN) { |
143 | wlr_log(L_DEBUG, "libinput_config_pointer(%s) accel_set_speed(%f)", | 155 | wlr_log(L_DEBUG, "libinput_config_pointer(%s) accel_set_speed(%f)", |
144 | ic->identifier, ic->pointer_accel); | 156 | ic->identifier, ic->pointer_accel); |
145 | libinput_device_config_accel_set_speed(libinput_device, ic->pointer_accel); | 157 | libinput_device_config_accel_set_speed(libinput_device, |
158 | ic->pointer_accel); | ||
146 | } | 159 | } |
147 | if (ic->scroll_method != INT_MIN) { | 160 | if (ic->scroll_method != INT_MIN) { |
148 | wlr_log(L_DEBUG, "libinput_config_pointer(%s) scroll_set_method(%d)", | 161 | wlr_log(L_DEBUG, "libinput_config_pointer(%s) scroll_set_method(%d)", |
149 | ic->identifier, ic->scroll_method); | 162 | ic->identifier, ic->scroll_method); |
150 | libinput_device_config_scroll_set_method(libinput_device, ic->scroll_method); | 163 | libinput_device_config_scroll_set_method(libinput_device, |
164 | ic->scroll_method); | ||
151 | } | 165 | } |
152 | if (ic->send_events != INT_MIN) { | 166 | if (ic->send_events != INT_MIN) { |
153 | wlr_log(L_DEBUG, "libinput_config_pointer(%s) send_events_set_mode(%d)", | 167 | wlr_log(L_DEBUG, "libinput_config_pointer(%s) send_events_set_mode(%d)", |
154 | ic->identifier, ic->send_events); | 168 | ic->identifier, ic->send_events); |
155 | libinput_device_config_send_events_set_mode(libinput_device, ic->send_events); | 169 | libinput_device_config_send_events_set_mode(libinput_device, |
170 | ic->send_events); | ||
156 | } | 171 | } |
157 | if (ic->tap != INT_MIN) { | 172 | if (ic->tap != INT_MIN) { |
158 | wlr_log(L_DEBUG, "libinput_config_pointer(%s) tap_set_enabled(%d)", | 173 | wlr_log(L_DEBUG, "libinput_config_pointer(%s) tap_set_enabled(%d)", |