aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLibravatar Tudor Brindus <me@tbrindus.ca>2020-04-25 17:57:47 -0400
committerLibravatar Simon Ser <contact@emersion.fr>2020-05-02 13:32:28 +0200
commitae3ec745f84c1efb643d61c0fc9a345745c07da5 (patch)
treea5474c0678329d1a8ae826fd484754c65f561254 /include
parentinput/cursor: disambiguate cursor functions from pointer functions (diff)
downloadsway-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 'include')
-rw-r--r--include/sway/input/seat.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/sway/input/seat.h b/include/sway/input/seat.h
index ad7cac75..1e255b47 100644
--- a/include/sway/input/seat.h
+++ b/include/sway/input/seat.h
@@ -7,6 +7,7 @@
7#include <wlr/util/edges.h> 7#include <wlr/util/edges.h>
8#include "sway/config.h" 8#include "sway/config.h"
9#include "sway/input/input-manager.h" 9#include "sway/input/input-manager.h"
10#include "sway/input/tablet.h"
10#include "sway/input/text_input.h" 11#include "sway/input/text_input.h"
11 12
12struct sway_seat; 13struct sway_seat;
@@ -19,6 +20,8 @@ struct sway_seatop_impl {
19 double dx, double dy); 20 double dx, double dy);
20 void (*axis)(struct sway_seat *seat, struct wlr_event_pointer_axis *event); 21 void (*axis)(struct sway_seat *seat, struct wlr_event_pointer_axis *event);
21 void (*rebase)(struct sway_seat *seat, uint32_t time_msec); 22 void (*rebase)(struct sway_seat *seat, uint32_t time_msec);
23 void (*tablet_tool_motion)(struct sway_seat *seat, struct sway_tablet *tablet,
24 struct sway_tablet_tool *tool, uint32_t time_msec, double dx, double dy);
22 void (*end)(struct sway_seat *seat); 25 void (*end)(struct sway_seat *seat);
23 void (*unref)(struct sway_seat *seat, struct sway_container *con); 26 void (*unref)(struct sway_seat *seat, struct sway_container *con);
24 void (*render)(struct sway_seat *seat, struct sway_output *output, 27 void (*render)(struct sway_seat *seat, struct sway_output *output,
@@ -261,6 +264,10 @@ void seatop_button(struct sway_seat *seat, uint32_t time_msec,
261void seatop_motion(struct sway_seat *seat, uint32_t time_msec, 264void seatop_motion(struct sway_seat *seat, uint32_t time_msec,
262 double dx, double dy); 265 double dx, double dy);
263 266
267void seatop_tablet_tool_motion(struct sway_seat *seat,
268 struct sway_tablet *tablet, struct sway_tablet_tool *tool,
269 uint32_t time_msec, double dx, double dy);
270
264void seatop_axis(struct sway_seat *seat, struct wlr_event_pointer_axis *event); 271void seatop_axis(struct sway_seat *seat, struct wlr_event_pointer_axis *event);
265 272
266void seatop_rebase(struct sway_seat *seat, uint32_t time_msec); 273void seatop_rebase(struct sway_seat *seat, uint32_t time_msec);