diff options
author | Tudor Brindus <me@tbrindus.ca> | 2020-04-25 17:57:47 -0400 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2020-05-02 13:32:28 +0200 |
commit | ae3ec745f84c1efb643d61c0fc9a345745c07da5 (patch) | |
tree | a5474c0678329d1a8ae826fd484754c65f561254 /sway/input/seat.c | |
parent | input/cursor: disambiguate cursor functions from pointer functions (diff) | |
download | sway-ae3ec745f84c1efb643d61c0fc9a345745c07da5.tar.gz sway-ae3ec745f84c1efb643d61c0fc9a345745c07da5.tar.zst sway-ae3ec745f84c1efb643d61c0fc9a345745c07da5.zip |
input: refactor tablet motion into seatop handler
This commit moves tablet motion logic into a seatop handler.
As a side-effect of seatop implementations being able to receive
tablet motion events, fixes #5232.
Diffstat (limited to 'sway/input/seat.c')
-rw-r--r-- | sway/input/seat.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/sway/input/seat.c b/sway/input/seat.c index df54261d..27751c27 100644 --- a/sway/input/seat.c +++ b/sway/input/seat.c | |||
@@ -1462,6 +1462,16 @@ void seatop_axis(struct sway_seat *seat, struct wlr_event_pointer_axis *event) { | |||
1462 | } | 1462 | } |
1463 | } | 1463 | } |
1464 | 1464 | ||
1465 | void seatop_tablet_tool_motion(struct sway_seat *seat, | ||
1466 | struct sway_tablet *tablet, struct sway_tablet_tool *tool, | ||
1467 | uint32_t time_msec, double dx, double dy) { | ||
1468 | if (seat->seatop_impl->tablet_tool_motion) { | ||
1469 | seat->seatop_impl->tablet_tool_motion(seat, tablet, tool, time_msec, dx, dy); | ||
1470 | } else { | ||
1471 | seatop_motion(seat, time_msec, dx, dy); | ||
1472 | } | ||
1473 | } | ||
1474 | |||
1465 | void seatop_rebase(struct sway_seat *seat, uint32_t time_msec) { | 1475 | void seatop_rebase(struct sway_seat *seat, uint32_t time_msec) { |
1466 | if (seat->seatop_impl->rebase) { | 1476 | if (seat->seatop_impl->rebase) { |
1467 | seat->seatop_impl->rebase(seat, time_msec); | 1477 | seat->seatop_impl->rebase(seat, time_msec); |