Merge branch 'pointer-warp' into 'master'

Draft: seat/pointer: add wl_pointer.warp event support

See merge request wlroots/wlroots!5237
This commit is contained in:
YaNing Lu 2026-02-03 20:40:07 +00:00
commit 1aeb76ebb1
5 changed files with 54 additions and 2 deletions

View file

@ -34,6 +34,7 @@ struct wlr_pointer {
struct wl_signal button; // struct wlr_pointer_button_event
struct wl_signal axis; // struct wlr_pointer_axis_event
struct wl_signal frame;
struct wl_signal warp; // struct wlr_pointer_warp_event
struct wl_signal swipe_begin; // struct wlr_pointer_swipe_begin_event
struct wl_signal swipe_update; // struct wlr_pointer_swipe_update_event
@ -82,7 +83,10 @@ struct wlr_pointer_axis_event {
double delta;
int32_t delta_discrete;
};
struct wlr_pointer_warp_event {
struct wlr_pointer *pointer;
double sx, sy;
};
struct wlr_pointer_swipe_begin_event {
struct wlr_pointer *pointer;
uint32_t time_msec;

View file

@ -432,6 +432,15 @@ void wlr_seat_pointer_send_axis(struct wlr_seat *wlr_seat, uint32_t time_msec,
*/
void wlr_seat_pointer_send_frame(struct wlr_seat *wlr_seat);
/**
* Send a warp event to the surface with pointer focus. This notifies the client
* that the pointer location has changed due to surface movement or compositor
* action, rather than input device motion. Coordinates are surface-local.
* This function does not respect pointer grabs.
*/
void wlr_seat_pointer_send_warp(struct wlr_seat *wlr_seat,
double sx, double sy);
/**
* Notify the seat of a pointer enter event to the given surface and request it
* to be the focused surface for the pointer. Pass surface-local coordinates