diff options
author | Dominique Martinet <asmadeus@codewreck.org> | 2018-01-05 22:32:51 +0100 |
---|---|---|
committer | Dominique Martinet <asmadeus@codewreck.org> | 2018-01-05 23:39:46 +0100 |
commit | 67985e903188a464e602d04f9ed218bd397f5ab1 (patch) | |
tree | 3589175749c9a2ed746b0cc280ab3ccfb33125e9 /sway/input/input-manager.c | |
parent | Merge pull request #1554 from martinetd/cmd_set (diff) | |
download | sway-67985e903188a464e602d04f9ed218bd397f5ab1.tar.gz sway-67985e903188a464e602d04f9ed218bd397f5ab1.tar.zst sway-67985e903188a464e602d04f9ed218bd397f5ab1.zip |
sway: change all sway_log to wlr_log
Diffstat (limited to 'sway/input/input-manager.c')
-rw-r--r-- | sway/input/input-manager.c | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/sway/input/input-manager.c b/sway/input/input-manager.c index 128a818a..26cf5035 100644 --- a/sway/input/input-manager.c +++ b/sway/input/input-manager.c | |||
@@ -52,7 +52,7 @@ static char *get_device_identifier(struct wlr_input_device *device) { | |||
52 | int len = snprintf(NULL, 0, fmt, vendor, product, name) + 1; | 52 | int len = snprintf(NULL, 0, fmt, vendor, product, name) + 1; |
53 | char *identifier = malloc(len); | 53 | char *identifier = malloc(len); |
54 | if (!identifier) { | 54 | if (!identifier) { |
55 | sway_log(L_ERROR, "Unable to allocate unique input device name"); | 55 | wlr_log(L_ERROR, "Unable to allocate unique input device name"); |
56 | return NULL; | 56 | return NULL; |
57 | } | 57 | } |
58 | 58 | ||
@@ -93,60 +93,60 @@ static void sway_input_manager_libinput_config_pointer(struct sway_input_device | |||
93 | } | 93 | } |
94 | 94 | ||
95 | libinput_device = wlr_libinput_get_device_handle(wlr_device); | 95 | libinput_device = wlr_libinput_get_device_handle(wlr_device); |
96 | sway_log(L_DEBUG, "sway_input_manager_libinput_config_pointer(%s)", ic->identifier); | 96 | wlr_log(L_DEBUG, "sway_input_manager_libinput_config_pointer(%s)", ic->identifier); |
97 | 97 | ||
98 | if (ic->accel_profile != INT_MIN) { | 98 | if (ic->accel_profile != INT_MIN) { |
99 | sway_log(L_DEBUG, "libinput_config_pointer(%s) accel_set_profile(%d)", | 99 | wlr_log(L_DEBUG, "libinput_config_pointer(%s) accel_set_profile(%d)", |
100 | ic->identifier, ic->accel_profile); | 100 | ic->identifier, ic->accel_profile); |
101 | libinput_device_config_accel_set_profile(libinput_device, ic->accel_profile); | 101 | libinput_device_config_accel_set_profile(libinput_device, ic->accel_profile); |
102 | } | 102 | } |
103 | if (ic->click_method != INT_MIN) { | 103 | if (ic->click_method != INT_MIN) { |
104 | sway_log(L_DEBUG, "libinput_config_pointer(%s) click_set_method(%d)", | 104 | wlr_log(L_DEBUG, "libinput_config_pointer(%s) click_set_method(%d)", |
105 | ic->identifier, ic->click_method); | 105 | ic->identifier, ic->click_method); |
106 | libinput_device_config_click_set_method(libinput_device, ic->click_method); | 106 | libinput_device_config_click_set_method(libinput_device, ic->click_method); |
107 | } | 107 | } |
108 | if (ic->drag_lock != INT_MIN) { | 108 | if (ic->drag_lock != INT_MIN) { |
109 | sway_log(L_DEBUG, "libinput_config_pointer(%s) tap_set_drag_lock_enabled(%d)", | 109 | wlr_log(L_DEBUG, "libinput_config_pointer(%s) tap_set_drag_lock_enabled(%d)", |
110 | ic->identifier, ic->click_method); | 110 | ic->identifier, ic->click_method); |
111 | libinput_device_config_tap_set_drag_lock_enabled(libinput_device, ic->drag_lock); | 111 | libinput_device_config_tap_set_drag_lock_enabled(libinput_device, ic->drag_lock); |
112 | } | 112 | } |
113 | if (ic->dwt != INT_MIN) { | 113 | if (ic->dwt != INT_MIN) { |
114 | sway_log(L_DEBUG, "libinput_config_pointer(%s) dwt_set_enabled(%d)", | 114 | wlr_log(L_DEBUG, "libinput_config_pointer(%s) dwt_set_enabled(%d)", |
115 | ic->identifier, ic->dwt); | 115 | ic->identifier, ic->dwt); |
116 | libinput_device_config_dwt_set_enabled(libinput_device, ic->dwt); | 116 | libinput_device_config_dwt_set_enabled(libinput_device, ic->dwt); |
117 | } | 117 | } |
118 | if (ic->left_handed != INT_MIN) { | 118 | if (ic->left_handed != INT_MIN) { |
119 | sway_log(L_DEBUG, "libinput_config_pointer(%s) left_handed_set_enabled(%d)", | 119 | wlr_log(L_DEBUG, "libinput_config_pointer(%s) left_handed_set_enabled(%d)", |
120 | ic->identifier, ic->left_handed); | 120 | ic->identifier, ic->left_handed); |
121 | libinput_device_config_left_handed_set(libinput_device, ic->left_handed); | 121 | libinput_device_config_left_handed_set(libinput_device, ic->left_handed); |
122 | } | 122 | } |
123 | if (ic->middle_emulation != INT_MIN) { | 123 | if (ic->middle_emulation != INT_MIN) { |
124 | sway_log(L_DEBUG, "libinput_config_pointer(%s) middle_emulation_set_enabled(%d)", | 124 | wlr_log(L_DEBUG, "libinput_config_pointer(%s) middle_emulation_set_enabled(%d)", |
125 | ic->identifier, ic->middle_emulation); | 125 | ic->identifier, ic->middle_emulation); |
126 | libinput_device_config_middle_emulation_set_enabled(libinput_device, ic->middle_emulation); | 126 | libinput_device_config_middle_emulation_set_enabled(libinput_device, ic->middle_emulation); |
127 | } | 127 | } |
128 | if (ic->natural_scroll != INT_MIN) { | 128 | if (ic->natural_scroll != INT_MIN) { |
129 | sway_log(L_DEBUG, "libinput_config_pointer(%s) natural_scroll_set_enabled(%d)", | 129 | wlr_log(L_DEBUG, "libinput_config_pointer(%s) natural_scroll_set_enabled(%d)", |
130 | ic->identifier, ic->natural_scroll); | 130 | ic->identifier, ic->natural_scroll); |
131 | libinput_device_config_scroll_set_natural_scroll_enabled(libinput_device, ic->natural_scroll); | 131 | libinput_device_config_scroll_set_natural_scroll_enabled(libinput_device, ic->natural_scroll); |
132 | } | 132 | } |
133 | if (ic->pointer_accel != FLT_MIN) { | 133 | if (ic->pointer_accel != FLT_MIN) { |
134 | sway_log(L_DEBUG, "libinput_config_pointer(%s) accel_set_speed(%f)", | 134 | wlr_log(L_DEBUG, "libinput_config_pointer(%s) accel_set_speed(%f)", |
135 | ic->identifier, ic->pointer_accel); | 135 | ic->identifier, ic->pointer_accel); |
136 | libinput_device_config_accel_set_speed(libinput_device, ic->pointer_accel); | 136 | libinput_device_config_accel_set_speed(libinput_device, ic->pointer_accel); |
137 | } | 137 | } |
138 | if (ic->scroll_method != INT_MIN) { | 138 | if (ic->scroll_method != INT_MIN) { |
139 | sway_log(L_DEBUG, "libinput_config_pointer(%s) scroll_set_method(%d)", | 139 | wlr_log(L_DEBUG, "libinput_config_pointer(%s) scroll_set_method(%d)", |
140 | ic->identifier, ic->scroll_method); | 140 | ic->identifier, ic->scroll_method); |
141 | libinput_device_config_scroll_set_method(libinput_device, ic->scroll_method); | 141 | libinput_device_config_scroll_set_method(libinput_device, ic->scroll_method); |
142 | } | 142 | } |
143 | if (ic->send_events != INT_MIN) { | 143 | if (ic->send_events != INT_MIN) { |
144 | sway_log(L_DEBUG, "libinput_config_pointer(%s) send_events_set_mode(%d)", | 144 | wlr_log(L_DEBUG, "libinput_config_pointer(%s) send_events_set_mode(%d)", |
145 | ic->identifier, ic->send_events); | 145 | ic->identifier, ic->send_events); |
146 | libinput_device_config_send_events_set_mode(libinput_device, ic->send_events); | 146 | libinput_device_config_send_events_set_mode(libinput_device, ic->send_events); |
147 | } | 147 | } |
148 | if (ic->tap != INT_MIN) { | 148 | if (ic->tap != INT_MIN) { |
149 | sway_log(L_DEBUG, "libinput_config_pointer(%s) tap_set_enabled(%d)", | 149 | wlr_log(L_DEBUG, "libinput_config_pointer(%s) tap_set_enabled(%d)", |
150 | ic->identifier, ic->tap); | 150 | ic->identifier, ic->tap); |
151 | libinput_device_config_tap_set_enabled(libinput_device, ic->tap); | 151 | libinput_device_config_tap_set_enabled(libinput_device, ic->tap); |
152 | } | 152 | } |
@@ -167,7 +167,7 @@ static void input_add_notify(struct wl_listener *listener, void *data) { | |||
167 | input_device->identifier = get_device_identifier(device); | 167 | input_device->identifier = get_device_identifier(device); |
168 | wl_list_insert(&input->devices, &input_device->link); | 168 | wl_list_insert(&input->devices, &input_device->link); |
169 | 169 | ||
170 | sway_log(L_DEBUG, "adding device: '%s'", | 170 | wlr_log(L_DEBUG, "adding device: '%s'", |
171 | input_device->identifier); | 171 | input_device->identifier); |
172 | 172 | ||
173 | // find config | 173 | // find config |
@@ -185,7 +185,7 @@ static void input_add_notify(struct wl_listener *listener, void *data) { | |||
185 | 185 | ||
186 | struct sway_seat *seat = NULL; | 186 | struct sway_seat *seat = NULL; |
187 | if (!input_has_seat_configuration(input)) { | 187 | if (!input_has_seat_configuration(input)) { |
188 | sway_log(L_DEBUG, "no seat configuration, using default seat"); | 188 | wlr_log(L_DEBUG, "no seat configuration, using default seat"); |
189 | seat = input_manager_get_seat(input, default_seat); | 189 | seat = input_manager_get_seat(input, default_seat); |
190 | sway_seat_add_device(seat, input_device); | 190 | sway_seat_add_device(seat, input_device); |
191 | return; | 191 | return; |
@@ -213,7 +213,7 @@ static void input_add_notify(struct wl_listener *listener, void *data) { | |||
213 | } | 213 | } |
214 | 214 | ||
215 | if (!added) { | 215 | if (!added) { |
216 | sway_log(L_DEBUG, | 216 | wlr_log(L_DEBUG, |
217 | "device '%s' is not configured on any seats", | 217 | "device '%s' is not configured on any seats", |
218 | input_device->identifier); | 218 | input_device->identifier); |
219 | } | 219 | } |
@@ -231,7 +231,7 @@ static void input_remove_notify(struct wl_listener *listener, void *data) { | |||
231 | return; | 231 | return; |
232 | } | 232 | } |
233 | 233 | ||
234 | sway_log(L_DEBUG, "removing device: '%s'", | 234 | wlr_log(L_DEBUG, "removing device: '%s'", |
235 | input_device->identifier); | 235 | input_device->identifier); |
236 | 236 | ||
237 | struct sway_seat *seat = NULL; | 237 | struct sway_seat *seat = NULL; |
@@ -309,7 +309,7 @@ void sway_input_manager_apply_input_config(struct sway_input_manager *input, | |||
309 | 309 | ||
310 | void sway_input_manager_apply_seat_config(struct sway_input_manager *input, | 310 | void sway_input_manager_apply_seat_config(struct sway_input_manager *input, |
311 | struct seat_config *seat_config) { | 311 | struct seat_config *seat_config) { |
312 | sway_log(L_DEBUG, "applying new seat config for seat %s", | 312 | wlr_log(L_DEBUG, "applying new seat config for seat %s", |
313 | seat_config->name); | 313 | seat_config->name); |
314 | struct sway_seat *seat = input_manager_get_seat(input, seat_config->name); | 314 | struct sway_seat *seat = input_manager_get_seat(input, seat_config->name); |
315 | if (!seat) { | 315 | if (!seat) { |