aboutsummaryrefslogtreecommitdiff
path: root/include/sway/input/seat.h
diff options
context:
space:
mode:
authorStacy Harper <contact@stacyharper.net>2021-08-21 16:04:08 +0200
committerSimon Zeni <simon@bl4ckb0ne.ca>2023-02-20 10:35:10 -0500
commit4666d1785bfb6635e6e8604de383c91714bceebc (patch)
treee940606bd8e735c26b4239342afe88116bf9f457 /include/sway/input/seat.h
parent7d2e4a51063ac90f950cb44f141ab391cbcaff5f (diff)
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 'include/sway/input/seat.h')
-rw-r--r--include/sway/input/seat.h23
1 files changed, 21 insertions, 2 deletions
diff --git a/include/sway/input/seat.h b/include/sway/input/seat.h
index 4abe91f7..227da78b 100644
--- a/include/sway/input/seat.h
+++ b/include/sway/input/seat.h
@@ -4,6 +4,7 @@
#include <wlr/types/wlr_keyboard_shortcuts_inhibit_v1.h>
#include <wlr/types/wlr_layer_shell_v1.h>
#include <wlr/types/wlr_seat.h>
+#include <wlr/types/wlr_touch.h>
#include <wlr/util/edges.h>
#include "sway/config.h"
#include "sway/input/input-manager.h"
@@ -36,6 +37,12 @@ struct sway_seatop_impl {
void (*swipe_end)(struct sway_seat *seat,
struct wlr_pointer_swipe_end_event *event);
void (*rebase)(struct sway_seat *seat, uint32_t time_msec);
+ void (*touch_motion)(struct sway_seat *seat,
+ struct wlr_touch_motion_event *event, double lx, double ly);
+ void (*touch_up)(struct sway_seat *seat,
+ struct wlr_touch_up_event *event);
+ void (*touch_down)(struct sway_seat *seat,
+ struct wlr_touch_down_event *event, double lx, double ly);
void (*tablet_tool_motion)(struct sway_seat *seat,
struct sway_tablet_tool *tool, uint32_t time_msec);
void (*tablet_tool_tip)(struct sway_seat *seat, struct sway_tablet_tool *tool,
@@ -256,10 +263,13 @@ enum wlr_edges find_resize_edge(struct sway_container *cont,
void seatop_begin_default(struct sway_seat *seat);
void seatop_begin_down(struct sway_seat *seat, struct sway_container *con,
- uint32_t time_msec, double sx, double sy);
+ double sx, double sy);
void seatop_begin_down_on_surface(struct sway_seat *seat,
- struct wlr_surface *surface, uint32_t time_msec, double sx, double sy);
+ struct wlr_surface *surface, double sx, double sy);
+
+void seatop_begin_touch_down(struct sway_seat *seat, struct wlr_surface *surface,
+ struct wlr_touch_down_event *event, double sx, double sy, double lx, double ly);
void seatop_begin_move_floating(struct sway_seat *seat,
struct sway_container *con);
@@ -319,6 +329,15 @@ void seatop_swipe_update(struct sway_seat *seat,
void seatop_swipe_end(struct sway_seat *seat,
struct wlr_pointer_swipe_end_event *event);
+void seatop_touch_motion(struct sway_seat *seat,
+ struct wlr_touch_motion_event *event, double lx, double ly);
+
+void seatop_touch_up(struct sway_seat *seat,
+ struct wlr_touch_up_event *event);
+
+void seatop_touch_down(struct sway_seat *seat,
+ struct wlr_touch_down_event *event, double lx, double ly);
+
void seatop_rebase(struct sway_seat *seat, uint32_t time_msec);
/**