diff options
author | Tony Crisci <tony@dubstepdish.com> | 2018-04-02 08:49:38 -0400 |
---|---|---|
committer | Tony Crisci <tony@dubstepdish.com> | 2018-04-02 08:49:38 -0400 |
commit | 0828c772514a85080c53ecade0b8b400314d5b03 (patch) | |
tree | 4e7fcb26ea1ebda57128eeb0ba4f9c79c7afbdb4 /sway/input | |
parent | rename seat functions (diff) | |
download | sway-0828c772514a85080c53ecade0b8b400314d5b03.tar.gz sway-0828c772514a85080c53ecade0b8b400314d5b03.tar.zst sway-0828c772514a85080c53ecade0b8b400314d5b03.zip |
rename input-manager functions
Diffstat (limited to 'sway/input')
-rw-r--r-- | sway/input/input-manager.c | 24 | ||||
-rw-r--r-- | sway/input/seat.c | 2 |
2 files changed, 13 insertions, 13 deletions
diff --git a/sway/input/input-manager.c b/sway/input/input-manager.c index 66ade685..4f3c3ee5 100644 --- a/sway/input/input-manager.c +++ b/sway/input/input-manager.c | |||
@@ -26,7 +26,7 @@ struct seat_config *current_seat_config = NULL; | |||
26 | struct sway_seat *input_manager_current_seat(struct sway_input_manager *input) { | 26 | struct sway_seat *input_manager_current_seat(struct sway_input_manager *input) { |
27 | struct sway_seat *seat = config->handler_context.seat; | 27 | struct sway_seat *seat = config->handler_context.seat; |
28 | if (!seat) { | 28 | if (!seat) { |
29 | seat = sway_input_manager_get_default_seat(input_manager); | 29 | seat = input_manager_get_default_seat(input_manager); |
30 | } | 30 | } |
31 | return seat; | 31 | return seat; |
32 | } | 32 | } |
@@ -91,7 +91,7 @@ static bool input_has_seat_configuration(struct sway_input_manager *input) { | |||
91 | return false; | 91 | return false; |
92 | } | 92 | } |
93 | 93 | ||
94 | static void sway_input_manager_libinput_config_pointer(struct sway_input_device *input_device) { | 94 | static void input_manager_libinput_config_pointer(struct sway_input_device *input_device) { |
95 | struct wlr_input_device *wlr_device = input_device->wlr_device; | 95 | struct wlr_input_device *wlr_device = input_device->wlr_device; |
96 | struct input_config *ic = input_device->config; | 96 | struct input_config *ic = input_device->config; |
97 | struct libinput_device *libinput_device; | 97 | struct libinput_device *libinput_device; |
@@ -101,7 +101,7 @@ static void sway_input_manager_libinput_config_pointer(struct sway_input_device | |||
101 | } | 101 | } |
102 | 102 | ||
103 | libinput_device = wlr_libinput_get_device_handle(wlr_device); | 103 | libinput_device = wlr_libinput_get_device_handle(wlr_device); |
104 | wlr_log(L_DEBUG, "sway_input_manager_libinput_config_pointer(%s)", ic->identifier); | 104 | wlr_log(L_DEBUG, "input_manager_libinput_config_pointer(%s)", ic->identifier); |
105 | 105 | ||
106 | if (ic->accel_profile != INT_MIN) { | 106 | if (ic->accel_profile != INT_MIN) { |
107 | wlr_log(L_DEBUG, "libinput_config_pointer(%s) accel_set_profile(%d)", | 107 | wlr_log(L_DEBUG, "libinput_config_pointer(%s) accel_set_profile(%d)", |
@@ -214,7 +214,7 @@ static void handle_new_input(struct wl_listener *listener, void *data) { | |||
214 | } | 214 | } |
215 | 215 | ||
216 | if (input_device->wlr_device->type == WLR_INPUT_DEVICE_POINTER) { | 216 | if (input_device->wlr_device->type == WLR_INPUT_DEVICE_POINTER) { |
217 | sway_input_manager_libinput_config_pointer(input_device); | 217 | input_manager_libinput_config_pointer(input_device); |
218 | } | 218 | } |
219 | 219 | ||
220 | struct sway_seat *seat = NULL; | 220 | struct sway_seat *seat = NULL; |
@@ -256,7 +256,7 @@ static void handle_new_input(struct wl_listener *listener, void *data) { | |||
256 | input_device->device_destroy.notify = handle_device_destroy; | 256 | input_device->device_destroy.notify = handle_device_destroy; |
257 | } | 257 | } |
258 | 258 | ||
259 | struct sway_input_manager *sway_input_manager_create( | 259 | struct sway_input_manager *input_manager_create( |
260 | struct sway_server *server) { | 260 | struct sway_server *server) { |
261 | struct sway_input_manager *input = | 261 | struct sway_input_manager *input = |
262 | calloc(1, sizeof(struct sway_input_manager)); | 262 | calloc(1, sizeof(struct sway_input_manager)); |
@@ -277,7 +277,7 @@ struct sway_input_manager *sway_input_manager_create( | |||
277 | return input; | 277 | return input; |
278 | } | 278 | } |
279 | 279 | ||
280 | bool sway_input_manager_has_focus(struct sway_input_manager *input, | 280 | bool input_manager_has_focus(struct sway_input_manager *input, |
281 | struct sway_container *container) { | 281 | struct sway_container *container) { |
282 | struct sway_seat *seat = NULL; | 282 | struct sway_seat *seat = NULL; |
283 | wl_list_for_each(seat, &input->seats, link) { | 283 | wl_list_for_each(seat, &input->seats, link) { |
@@ -289,7 +289,7 @@ bool sway_input_manager_has_focus(struct sway_input_manager *input, | |||
289 | return false; | 289 | return false; |
290 | } | 290 | } |
291 | 291 | ||
292 | void sway_input_manager_set_focus(struct sway_input_manager *input, | 292 | void input_manager_set_focus(struct sway_input_manager *input, |
293 | struct sway_container *container) { | 293 | struct sway_container *container) { |
294 | struct sway_seat *seat ; | 294 | struct sway_seat *seat ; |
295 | wl_list_for_each(seat, &input->seats, link) { | 295 | wl_list_for_each(seat, &input->seats, link) { |
@@ -297,7 +297,7 @@ void sway_input_manager_set_focus(struct sway_input_manager *input, | |||
297 | } | 297 | } |
298 | } | 298 | } |
299 | 299 | ||
300 | void sway_input_manager_apply_input_config(struct sway_input_manager *input, | 300 | void input_manager_apply_input_config(struct sway_input_manager *input, |
301 | struct input_config *input_config) { | 301 | struct input_config *input_config) { |
302 | struct sway_input_device *input_device = NULL; | 302 | struct sway_input_device *input_device = NULL; |
303 | wl_list_for_each(input_device, &input->devices, link) { | 303 | wl_list_for_each(input_device, &input->devices, link) { |
@@ -306,7 +306,7 @@ void sway_input_manager_apply_input_config(struct sway_input_manager *input, | |||
306 | input_device->config = copy_input_config(input_config); | 306 | input_device->config = copy_input_config(input_config); |
307 | 307 | ||
308 | if (input_device->wlr_device->type == WLR_INPUT_DEVICE_POINTER) { | 308 | if (input_device->wlr_device->type == WLR_INPUT_DEVICE_POINTER) { |
309 | sway_input_manager_libinput_config_pointer(input_device); | 309 | input_manager_libinput_config_pointer(input_device); |
310 | } | 310 | } |
311 | 311 | ||
312 | struct sway_seat *seat = NULL; | 312 | struct sway_seat *seat = NULL; |
@@ -317,7 +317,7 @@ void sway_input_manager_apply_input_config(struct sway_input_manager *input, | |||
317 | } | 317 | } |
318 | } | 318 | } |
319 | 319 | ||
320 | void sway_input_manager_apply_seat_config(struct sway_input_manager *input, | 320 | void input_manager_apply_seat_config(struct sway_input_manager *input, |
321 | struct seat_config *seat_config) { | 321 | struct seat_config *seat_config) { |
322 | wlr_log(L_DEBUG, "applying new seat config for seat %s", | 322 | wlr_log(L_DEBUG, "applying new seat config for seat %s", |
323 | seat_config->name); | 323 | seat_config->name); |
@@ -373,14 +373,14 @@ void sway_input_manager_apply_seat_config(struct sway_input_manager *input, | |||
373 | } | 373 | } |
374 | } | 374 | } |
375 | 375 | ||
376 | void sway_input_manager_configure_xcursor(struct sway_input_manager *input) { | 376 | void input_manager_configure_xcursor(struct sway_input_manager *input) { |
377 | struct sway_seat *seat = NULL; | 377 | struct sway_seat *seat = NULL; |
378 | wl_list_for_each(seat, &input->seats, link) { | 378 | wl_list_for_each(seat, &input->seats, link) { |
379 | seat_configure_xcursor(seat); | 379 | seat_configure_xcursor(seat); |
380 | } | 380 | } |
381 | } | 381 | } |
382 | 382 | ||
383 | struct sway_seat *sway_input_manager_get_default_seat( | 383 | struct sway_seat *input_manager_get_default_seat( |
384 | struct sway_input_manager *input) { | 384 | struct sway_input_manager *input) { |
385 | struct sway_seat *seat = NULL; | 385 | struct sway_seat *seat = NULL; |
386 | wl_list_for_each(seat, &input->seats, link) { | 386 | wl_list_for_each(seat, &input->seats, link) { |
diff --git a/sway/input/seat.c b/sway/input/seat.c index 70395144..c2ecd1c4 100644 --- a/sway/input/seat.c +++ b/sway/input/seat.c | |||
@@ -364,7 +364,7 @@ void seat_set_focus_warp(struct sway_seat *seat, | |||
364 | } | 364 | } |
365 | 365 | ||
366 | if (last_focus && last_focus->type == C_VIEW && | 366 | if (last_focus && last_focus->type == C_VIEW && |
367 | !sway_input_manager_has_focus(seat->input, last_focus)) { | 367 | !input_manager_has_focus(seat->input, last_focus)) { |
368 | struct sway_view *view = last_focus->sway_view; | 368 | struct sway_view *view = last_focus->sway_view; |
369 | view_set_activated(view, false); | 369 | view_set_activated(view, false); |
370 | } | 370 | } |