diff options
author | Tudor Brindus <me@tbrindus.ca> | 2020-05-02 12:15:39 -0400 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2020-05-02 18:28:06 +0200 |
commit | e262f93d0a93c52b72fa1e64c29021ef2784d5fb (patch) | |
tree | c7e091dae7181c289520b44f3984d9cd7854a8ca /sway/input/seatop_default.c | |
parent | input: refactor tablet motion into seatop handler (diff) | |
download | sway-e262f93d0a93c52b72fa1e64c29021ef2784d5fb.tar.gz sway-e262f93d0a93c52b72fa1e64c29021ef2784d5fb.tar.zst sway-e262f93d0a93c52b72fa1e64c29021ef2784d5fb.zip |
input: rename pointer handlers to be unambiguous
This commit renames `motion` and `axis` handlers to `pointer_motion` and
`pointer_axis`, respectively, to disambiguate them from their tablet
(and future touch) handlers. `button` is left as-is, as it is generic
across input devices.
Diffstat (limited to 'sway/input/seatop_default.c')
-rw-r--r-- | sway/input/seatop_default.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/sway/input/seatop_default.c b/sway/input/seatop_default.c index b7e3ff3f..e0838c04 100644 --- a/sway/input/seatop_default.c +++ b/sway/input/seatop_default.c | |||
@@ -405,9 +405,9 @@ static void handle_button(struct sway_seat *seat, uint32_t time_msec, | |||
405 | seat_pointer_notify_button(seat, time_msec, button, state); | 405 | seat_pointer_notify_button(seat, time_msec, button, state); |
406 | } | 406 | } |
407 | 407 | ||
408 | /*----------------------------------\ | 408 | /*------------------------------------------\ |
409 | * Functions used by handle_motion / | 409 | * Functions used by handle_pointer_motion / |
410 | *--------------------------------*/ | 410 | *----------------------------------------*/ |
411 | 411 | ||
412 | static void check_focus_follows_mouse(struct sway_seat *seat, | 412 | static void check_focus_follows_mouse(struct sway_seat *seat, |
413 | struct seatop_default_event *e, struct sway_node *hovered_node) { | 413 | struct seatop_default_event *e, struct sway_node *hovered_node) { |
@@ -439,7 +439,7 @@ static void check_focus_follows_mouse(struct sway_seat *seat, | |||
439 | } | 439 | } |
440 | } | 440 | } |
441 | 441 | ||
442 | static void handle_motion(struct sway_seat *seat, uint32_t time_msec, | 442 | static void handle_pointer_motion(struct sway_seat *seat, uint32_t time_msec, |
443 | double dx, double dy) { | 443 | double dx, double dy) { |
444 | struct seatop_default_event *e = seat->seatop_data; | 444 | struct seatop_default_event *e = seat->seatop_data; |
445 | struct sway_cursor *cursor = seat->cursor; | 445 | struct sway_cursor *cursor = seat->cursor; |
@@ -510,9 +510,9 @@ static void handle_tablet_tool_motion(struct sway_seat *seat, | |||
510 | e->previous_node = node; | 510 | e->previous_node = node; |
511 | } | 511 | } |
512 | 512 | ||
513 | /*--------------------------------\ | 513 | /*----------------------------------------\ |
514 | * Functions used by handle_axis / | 514 | * Functions used by handle_pointer_axis / |
515 | *------------------------------*/ | 515 | *--------------------------------------*/ |
516 | 516 | ||
517 | static uint32_t wl_axis_to_button(struct wlr_event_pointer_axis *event) { | 517 | static uint32_t wl_axis_to_button(struct wlr_event_pointer_axis *event) { |
518 | switch (event->orientation) { | 518 | switch (event->orientation) { |
@@ -526,7 +526,7 @@ static uint32_t wl_axis_to_button(struct wlr_event_pointer_axis *event) { | |||
526 | } | 526 | } |
527 | } | 527 | } |
528 | 528 | ||
529 | static void handle_axis(struct sway_seat *seat, | 529 | static void handle_pointer_axis(struct sway_seat *seat, |
530 | struct wlr_event_pointer_axis *event) { | 530 | struct wlr_event_pointer_axis *event) { |
531 | struct sway_input_device *input_device = | 531 | struct sway_input_device *input_device = |
532 | event->device ? event->device->data : NULL; | 532 | event->device ? event->device->data : NULL; |
@@ -648,8 +648,8 @@ static void handle_rebase(struct sway_seat *seat, uint32_t time_msec) { | |||
648 | 648 | ||
649 | static const struct sway_seatop_impl seatop_impl = { | 649 | static const struct sway_seatop_impl seatop_impl = { |
650 | .button = handle_button, | 650 | .button = handle_button, |
651 | .motion = handle_motion, | 651 | .pointer_motion = handle_pointer_motion, |
652 | .axis = handle_axis, | 652 | .pointer_axis = handle_pointer_axis, |
653 | .tablet_tool_motion = handle_tablet_tool_motion, | 653 | .tablet_tool_motion = handle_tablet_tool_motion, |
654 | .rebase = handle_rebase, | 654 | .rebase = handle_rebase, |
655 | .allow_set_cursor = true, | 655 | .allow_set_cursor = true, |