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/seat.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/seat.c')
-rw-r--r-- | sway/input/seat.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/sway/input/seat.c b/sway/input/seat.c index 27751c27..4abffb25 100644 --- a/sway/input/seat.c +++ b/sway/input/seat.c | |||
@@ -1449,16 +1449,17 @@ void seatop_button(struct sway_seat *seat, uint32_t time_msec, | |||
1449 | } | 1449 | } |
1450 | } | 1450 | } |
1451 | 1451 | ||
1452 | void seatop_motion(struct sway_seat *seat, uint32_t time_msec, | 1452 | void seatop_pointer_motion(struct sway_seat *seat, uint32_t time_msec, |
1453 | double dx, double dy) { | 1453 | double dx, double dy) { |
1454 | if (seat->seatop_impl->motion) { | 1454 | if (seat->seatop_impl->pointer_motion) { |
1455 | seat->seatop_impl->motion(seat, time_msec, dx, dy); | 1455 | seat->seatop_impl->pointer_motion(seat, time_msec, dx, dy); |
1456 | } | 1456 | } |
1457 | } | 1457 | } |
1458 | 1458 | ||
1459 | void seatop_axis(struct sway_seat *seat, struct wlr_event_pointer_axis *event) { | 1459 | void seatop_pointer_axis(struct sway_seat *seat, |
1460 | if (seat->seatop_impl->axis) { | 1460 | struct wlr_event_pointer_axis *event) { |
1461 | seat->seatop_impl->axis(seat, event); | 1461 | if (seat->seatop_impl->pointer_axis) { |
1462 | seat->seatop_impl->pointer_axis(seat, event); | ||
1462 | } | 1463 | } |
1463 | } | 1464 | } |
1464 | 1465 | ||
@@ -1468,7 +1469,7 @@ void seatop_tablet_tool_motion(struct sway_seat *seat, | |||
1468 | if (seat->seatop_impl->tablet_tool_motion) { | 1469 | if (seat->seatop_impl->tablet_tool_motion) { |
1469 | seat->seatop_impl->tablet_tool_motion(seat, tablet, tool, time_msec, dx, dy); | 1470 | seat->seatop_impl->tablet_tool_motion(seat, tablet, tool, time_msec, dx, dy); |
1470 | } else { | 1471 | } else { |
1471 | seatop_motion(seat, time_msec, dx, dy); | 1472 | seatop_pointer_motion(seat, time_msec, dx, dy); |
1472 | } | 1473 | } |
1473 | } | 1474 | } |
1474 | 1475 | ||