aboutsummaryrefslogtreecommitdiff
path: root/include/wlr
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2021-06-30 13:09:45 +0200
committerSimon Ser <contact@emersion.fr>2021-07-08 09:12:17 +0200
commitb934fbaf046126705b96e5253551ccab64a72320 (patch)
tree782299524f04b9e49d2cce0a0529c1d9f3342ab8 /include/wlr
parent22fd411bc3e77da5ec2e866b6e52e1bf16f69815 (diff)
seat: add wlr_seat_touch_{send,notify}_frame
The wl_touch.frame event is used to group multiple touch events together. Instead of sending it immediately after each touch event, rely on the backend to send it (and on the compositor to relay it). This is a breaking change because compositors now need to manually send touch frame events instead of relying on wlr_seat to do it.
Diffstat (limited to 'include/wlr')
-rw-r--r--include/wlr/types/wlr_seat.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/include/wlr/types/wlr_seat.h b/include/wlr/types/wlr_seat.h
index b34d4a72..6ee9e44d 100644
--- a/include/wlr/types/wlr_seat.h
+++ b/include/wlr/types/wlr_seat.h
@@ -52,11 +52,12 @@ struct wlr_seat_client {
// set of serials which were sent to the client on this seat
// for use by wlr_seat_client_{next_serial,validate_event_serial}
struct wlr_serial_ringset serials;
+ bool needs_touch_frame;
};
struct wlr_touch_point {
int32_t touch_id;
- struct wlr_surface *surface;
+ struct wlr_surface *surface; // may be NULL if destroyed
struct wlr_seat_client *client;
struct wlr_surface *focus_surface;
@@ -116,6 +117,7 @@ struct wlr_touch_grab_interface {
struct wlr_touch_point *point);
void (*enter)(struct wlr_seat_touch_grab *grab, uint32_t time_msec,
struct wlr_touch_point *point);
+ void (*frame)(struct wlr_seat_touch_grab *grab);
// XXX this will conflict with the actual touch cancel which is different so
// we need to rename this
void (*cancel)(struct wlr_seat_touch_grab *grab);
@@ -607,6 +609,8 @@ void wlr_seat_touch_send_up(struct wlr_seat *seat, uint32_t time_msec,
void wlr_seat_touch_send_motion(struct wlr_seat *seat, uint32_t time_msec,
int32_t touch_id, double sx, double sy);
+void wlr_seat_touch_send_frame(struct wlr_seat *seat);
+
/**
* Notify the seat of a touch down on the given surface. Defers to any grab of
* the touch device.
@@ -631,6 +635,8 @@ void wlr_seat_touch_notify_up(struct wlr_seat *seat, uint32_t time_msec,
void wlr_seat_touch_notify_motion(struct wlr_seat *seat, uint32_t time_msec,
int32_t touch_id, double sx, double sy);
+void wlr_seat_touch_notify_frame(struct wlr_seat *seat);
+
/**
* How many touch points are currently down for the seat.
*/