diff options
Diffstat (limited to 'sway/input')
-rw-r--r-- | sway/input/cursor.c | 12 | ||||
-rw-r--r-- | sway/input/input-manager.c | 36 | ||||
-rw-r--r-- | sway/input/keyboard.c | 6 | ||||
-rw-r--r-- | sway/input/seat.c | 8 |
4 files changed, 31 insertions, 31 deletions
diff --git a/sway/input/cursor.c b/sway/input/cursor.c index 3b5cfce5..c51b59f9 100644 --- a/sway/input/cursor.c +++ b/sway/input/cursor.c | |||
@@ -85,35 +85,35 @@ static void handle_touch_down(struct wl_listener *listener, void *data) { | |||
85 | struct sway_cursor *cursor = | 85 | struct sway_cursor *cursor = |
86 | wl_container_of(listener, cursor, touch_down); | 86 | wl_container_of(listener, cursor, touch_down); |
87 | struct wlr_event_touch_down *event = data; | 87 | struct wlr_event_touch_down *event = data; |
88 | sway_log(L_DEBUG, "TODO: handle touch down event: %p", event); | 88 | wlr_log(L_DEBUG, "TODO: handle touch down event: %p", event); |
89 | } | 89 | } |
90 | 90 | ||
91 | static void handle_touch_up(struct wl_listener *listener, void *data) { | 91 | static void handle_touch_up(struct wl_listener *listener, void *data) { |
92 | struct sway_cursor *cursor = | 92 | struct sway_cursor *cursor = |
93 | wl_container_of(listener, cursor, touch_up); | 93 | wl_container_of(listener, cursor, touch_up); |
94 | struct wlr_event_touch_up *event = data; | 94 | struct wlr_event_touch_up *event = data; |
95 | sway_log(L_DEBUG, "TODO: handle touch up event: %p", event); | 95 | wlr_log(L_DEBUG, "TODO: handle touch up event: %p", event); |
96 | } | 96 | } |
97 | 97 | ||
98 | static void handle_touch_motion(struct wl_listener *listener, void *data) { | 98 | static void handle_touch_motion(struct wl_listener *listener, void *data) { |
99 | struct sway_cursor *cursor = | 99 | struct sway_cursor *cursor = |
100 | wl_container_of(listener, cursor, touch_motion); | 100 | wl_container_of(listener, cursor, touch_motion); |
101 | struct wlr_event_touch_motion *event = data; | 101 | struct wlr_event_touch_motion *event = data; |
102 | sway_log(L_DEBUG, "TODO: handle touch motion event: %p", event); | 102 | wlr_log(L_DEBUG, "TODO: handle touch motion event: %p", event); |
103 | } | 103 | } |
104 | 104 | ||
105 | static void handle_tool_axis(struct wl_listener *listener, void *data) { | 105 | static void handle_tool_axis(struct wl_listener *listener, void *data) { |
106 | struct sway_cursor *cursor = | 106 | struct sway_cursor *cursor = |
107 | wl_container_of(listener, cursor, tool_axis); | 107 | wl_container_of(listener, cursor, tool_axis); |
108 | struct wlr_event_tablet_tool_axis *event = data; | 108 | struct wlr_event_tablet_tool_axis *event = data; |
109 | sway_log(L_DEBUG, "TODO: handle tool axis event: %p", event); | 109 | wlr_log(L_DEBUG, "TODO: handle tool axis event: %p", event); |
110 | } | 110 | } |
111 | 111 | ||
112 | static void handle_tool_tip(struct wl_listener *listener, void *data) { | 112 | static void handle_tool_tip(struct wl_listener *listener, void *data) { |
113 | struct sway_cursor *cursor = | 113 | struct sway_cursor *cursor = |
114 | wl_container_of(listener, cursor, tool_tip); | 114 | wl_container_of(listener, cursor, tool_tip); |
115 | struct wlr_event_tablet_tool_tip *event = data; | 115 | struct wlr_event_tablet_tool_tip *event = data; |
116 | sway_log(L_DEBUG, "TODO: handle tool tip event: %p", event); | 116 | wlr_log(L_DEBUG, "TODO: handle tool tip event: %p", event); |
117 | } | 117 | } |
118 | 118 | ||
119 | static void handle_request_set_cursor(struct wl_listener *listener, | 119 | static void handle_request_set_cursor(struct wl_listener *listener, |
@@ -121,7 +121,7 @@ static void handle_request_set_cursor(struct wl_listener *listener, | |||
121 | struct sway_cursor *cursor = | 121 | struct sway_cursor *cursor = |
122 | wl_container_of(listener, cursor, request_set_cursor); | 122 | wl_container_of(listener, cursor, request_set_cursor); |
123 | struct wlr_seat_pointer_request_set_cursor_event *event = data; | 123 | struct wlr_seat_pointer_request_set_cursor_event *event = data; |
124 | sway_log(L_DEBUG, "TODO: handle request set cursor event: %p", event); | 124 | wlr_log(L_DEBUG, "TODO: handle request set cursor event: %p", event); |
125 | } | 125 | } |
126 | 126 | ||
127 | struct sway_cursor *sway_cursor_create(struct sway_seat *seat) { | 127 | struct sway_cursor *sway_cursor_create(struct sway_seat *seat) { |
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) { |
diff --git a/sway/input/keyboard.c b/sway/input/keyboard.c index c2bb2578..e7539c48 100644 --- a/sway/input/keyboard.c +++ b/sway/input/keyboard.c | |||
@@ -90,11 +90,11 @@ static bool binding_matches_key_state(struct sway_binding *binding, | |||
90 | } | 90 | } |
91 | 91 | ||
92 | static void binding_execute_command(struct sway_binding *binding) { | 92 | static void binding_execute_command(struct sway_binding *binding) { |
93 | sway_log(L_DEBUG, "running command for binding: %s", | 93 | wlr_log(L_DEBUG, "running command for binding: %s", |
94 | binding->command); | 94 | binding->command); |
95 | struct cmd_results *results = handle_command(binding->command); | 95 | struct cmd_results *results = handle_command(binding->command); |
96 | if (results->status != CMD_SUCCESS) { | 96 | if (results->status != CMD_SUCCESS) { |
97 | sway_log(L_DEBUG, "could not run command for binding: %s", | 97 | wlr_log(L_DEBUG, "could not run command for binding: %s", |
98 | binding->command); | 98 | binding->command); |
99 | } | 99 | } |
100 | free_cmd_results(results); | 100 | free_cmd_results(results); |
@@ -467,7 +467,7 @@ void sway_keyboard_configure(struct sway_keyboard *keyboard) { | |||
467 | xkb_keymap_new_from_names(context, &rules, XKB_KEYMAP_COMPILE_NO_FLAGS); | 467 | xkb_keymap_new_from_names(context, &rules, XKB_KEYMAP_COMPILE_NO_FLAGS); |
468 | 468 | ||
469 | if (!keymap) { | 469 | if (!keymap) { |
470 | sway_log(L_DEBUG, "cannot configure keyboard: keymap does not exist"); | 470 | wlr_log(L_DEBUG, "cannot configure keyboard: keymap does not exist"); |
471 | xkb_context_unref(context); | 471 | xkb_context_unref(context); |
472 | return; | 472 | return; |
473 | } | 473 | } |
diff --git a/sway/input/seat.c b/sway/input/seat.c index 9a6a667b..268486ab 100644 --- a/sway/input/seat.c +++ b/sway/input/seat.c | |||
@@ -112,7 +112,7 @@ void sway_seat_configure_device(struct sway_seat *seat, | |||
112 | case WLR_INPUT_DEVICE_TOUCH: | 112 | case WLR_INPUT_DEVICE_TOUCH: |
113 | case WLR_INPUT_DEVICE_TABLET_PAD: | 113 | case WLR_INPUT_DEVICE_TABLET_PAD: |
114 | case WLR_INPUT_DEVICE_TABLET_TOOL: | 114 | case WLR_INPUT_DEVICE_TABLET_TOOL: |
115 | sway_log(L_DEBUG, "TODO: configure other devices"); | 115 | wlr_log(L_DEBUG, "TODO: configure other devices"); |
116 | break; | 116 | break; |
117 | } | 117 | } |
118 | } | 118 | } |
@@ -127,11 +127,11 @@ void sway_seat_add_device(struct sway_seat *seat, | |||
127 | struct sway_seat_device *seat_device = | 127 | struct sway_seat_device *seat_device = |
128 | calloc(1, sizeof(struct sway_seat_device)); | 128 | calloc(1, sizeof(struct sway_seat_device)); |
129 | if (!seat_device) { | 129 | if (!seat_device) { |
130 | sway_log(L_DEBUG, "could not allocate seat device"); | 130 | wlr_log(L_DEBUG, "could not allocate seat device"); |
131 | return; | 131 | return; |
132 | } | 132 | } |
133 | 133 | ||
134 | sway_log(L_DEBUG, "adding device %s to seat %s", | 134 | wlr_log(L_DEBUG, "adding device %s to seat %s", |
135 | input_device->identifier, seat->wlr_seat->name); | 135 | input_device->identifier, seat->wlr_seat->name); |
136 | 136 | ||
137 | seat_device->sway_seat = seat; | 137 | seat_device->sway_seat = seat; |
@@ -150,7 +150,7 @@ void sway_seat_remove_device(struct sway_seat *seat, | |||
150 | return; | 150 | return; |
151 | } | 151 | } |
152 | 152 | ||
153 | sway_log(L_DEBUG, "removing device %s from seat %s", | 153 | wlr_log(L_DEBUG, "removing device %s from seat %s", |
154 | input_device->identifier, seat->wlr_seat->name); | 154 | input_device->identifier, seat->wlr_seat->name); |
155 | 155 | ||
156 | seat_device_destroy(seat_device); | 156 | seat_device_destroy(seat_device); |