mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-23 06:59:44 -05:00
touch: make cancel functions take a wlr_seat_client
The surface argument is only used to obtain a wlr_seat_client and semantically makes no sense. The wl_touch.cancel event applies to all touch points and all surfaces of a client. I decided to make the functions accept a wlr_seat_client rather than a wl_client as it is directly available in the wlr_touch_point struct and simplifies the implementation.
This commit is contained in:
parent
2f3ea4590a
commit
34219b0334
2 changed files with 11 additions and 20 deletions
|
|
@ -137,7 +137,7 @@ struct wlr_touch_grab_interface {
|
|||
void (*cancel)(struct wlr_seat_touch_grab *grab);
|
||||
// Send wl_touch.cancel
|
||||
void (*wl_cancel)(struct wlr_seat_touch_grab *grab,
|
||||
struct wlr_surface *surface);
|
||||
struct wlr_seat_client *seat_client);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -632,11 +632,12 @@ void wlr_seat_touch_send_motion(struct wlr_seat *seat, uint32_t time_msec,
|
|||
|
||||
/**
|
||||
* Notify the seat that this is a global gesture and the client should cancel
|
||||
* processing it. The event will go to the client for the surface given.
|
||||
* processing it. The event will go to the client given.
|
||||
* This function does not respect touch grabs: you probably want
|
||||
* wlr_seat_touch_notify_cancel() instead.
|
||||
*/
|
||||
void wlr_seat_touch_send_cancel(struct wlr_seat *seat, struct wlr_surface *surface);
|
||||
void wlr_seat_touch_send_cancel(struct wlr_seat *seat,
|
||||
struct wlr_seat_client *seat_client);
|
||||
|
||||
void wlr_seat_touch_send_frame(struct wlr_seat *seat);
|
||||
|
||||
|
|
@ -669,7 +670,7 @@ void wlr_seat_touch_notify_motion(struct wlr_seat *seat, uint32_t time_msec,
|
|||
* cancel processing it. Defers to any grab of the touch device.
|
||||
*/
|
||||
void wlr_seat_touch_notify_cancel(struct wlr_seat *seat,
|
||||
struct wlr_surface *surface);
|
||||
struct wlr_seat_client *seat_client);
|
||||
|
||||
void wlr_seat_touch_notify_frame(struct wlr_seat *seat);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue