aboutsummaryrefslogtreecommitdiffstats
path: root/sway/input/seat.c
diff options
context:
space:
mode:
authorLibravatar Stacy Harper <contact@stacyharper.net>2021-08-21 16:04:08 +0200
committerLibravatar Simon Zeni <simon@bl4ckb0ne.ca>2023-02-20 10:35:10 -0500
commit4666d1785bfb6635e6e8604de383c91714bceebc (patch)
treee940606bd8e735c26b4239342afe88116bf9f457 /sway/input/seat.c
parentlayer-shell: enter output before surface is mapped (diff)
downloadsway-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.c20
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
1621void 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
1628void 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
1634void 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
1621void seatop_tablet_tool_tip(struct sway_seat *seat, 1641void 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) {