diff options
author | Stacy Harper <contact@stacyharper.net> | 2021-08-21 16:04:08 +0200 |
---|---|---|
committer | Simon Zeni <simon@bl4ckb0ne.ca> | 2023-02-20 10:35:10 -0500 |
commit | 4666d1785bfb6635e6e8604de383c91714bceebc (patch) | |
tree | e940606bd8e735c26b4239342afe88116bf9f457 /sway/input/seat.c | |
parent | layer-shell: enter output before surface is mapped (diff) | |
download | sway-4666d1785bfb6635e6e8604de383c91714bceebc.tar.gz sway-4666d1785bfb6635e6e8604de383c91714bceebc.tar.zst sway-4666d1785bfb6635e6e8604de383c91714bceebc.zip |
Implement seatop_touch
Atm we got issue with the touch position sent to the clients. While
holding contact, leaving the initial container will continue to send
motion event to the client but with the new local position from the new
container.
This seatop goal is to send the position of the touch event, relatively
to the initial container layout position.
Diffstat (limited to 'sway/input/seat.c')
-rw-r--r-- | sway/input/seat.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/sway/input/seat.c b/sway/input/seat.c index 090a4d3c..bff425dd 100644 --- a/sway/input/seat.c +++ b/sway/input/seat.c | |||
@@ -1618,6 +1618,26 @@ void seatop_pointer_axis(struct sway_seat *seat, | |||
1618 | } | 1618 | } |
1619 | } | 1619 | } |
1620 | 1620 | ||
1621 | void seatop_touch_motion(struct sway_seat *seat, struct wlr_touch_motion_event *event, | ||
1622 | double lx, double ly) { | ||
1623 | if (seat->seatop_impl->touch_motion) { | ||
1624 | seat->seatop_impl->touch_motion(seat, event, lx, ly); | ||
1625 | } | ||
1626 | } | ||
1627 | |||
1628 | void seatop_touch_up(struct sway_seat *seat, struct wlr_touch_up_event *event) { | ||
1629 | if (seat->seatop_impl->touch_up) { | ||
1630 | seat->seatop_impl->touch_up(seat, event); | ||
1631 | } | ||
1632 | } | ||
1633 | |||
1634 | void seatop_touch_down(struct sway_seat *seat, struct wlr_touch_down_event *event, | ||
1635 | double lx, double ly) { | ||
1636 | if (seat->seatop_impl->touch_down) { | ||
1637 | seat->seatop_impl->touch_down(seat, event, lx, ly); | ||
1638 | } | ||
1639 | } | ||
1640 | |||
1621 | void seatop_tablet_tool_tip(struct sway_seat *seat, | 1641 | void seatop_tablet_tool_tip(struct sway_seat *seat, |
1622 | struct sway_tablet_tool *tool, uint32_t time_msec, | 1642 | struct sway_tablet_tool *tool, uint32_t time_msec, |
1623 | enum wlr_tablet_tool_tip_state state) { | 1643 | enum wlr_tablet_tool_tip_state state) { |