diff options
author | random human <random.bored.human@gmail.com> | 2018-10-01 06:21:32 +0530 |
---|---|---|
committer | Alex Maese <memaese@hotmail.com> | 2018-12-21 12:20:48 -0600 |
commit | d0203446751f2b8b4e80ecf54b6ff831096c3302 (patch) | |
tree | 9c011d365e9e17821cf4bf6659b4122e4cc687a0 /include | |
parent | ba5b1676dfb0041c88e4966a6c32dee5a5a6513a (diff) |
relative_pointer: implement protocol events
Implement zwp_relative_pointer_v1.relative_motion event, along with some
glue code in wlr_seat_pointer and rootston.
Diffstat (limited to 'include')
-rw-r--r-- | include/wlr/types/wlr_relative_pointer_v1.h | 4 | ||||
-rw-r--r-- | include/wlr/types/wlr_seat.h | 12 |
2 files changed, 16 insertions, 0 deletions
diff --git a/include/wlr/types/wlr_relative_pointer_v1.h b/include/wlr/types/wlr_relative_pointer_v1.h index 94ae053b..c74766b9 100644 --- a/include/wlr/types/wlr_relative_pointer_v1.h +++ b/include/wlr/types/wlr_relative_pointer_v1.h @@ -66,4 +66,8 @@ struct wlr_relative_pointer_v1 { struct wlr_relative_pointer_manager_v1 *wlr_relative_pointer_v1_create(struct wl_display *display); void wlr_relative_pointer_v1_destroy(struct wlr_relative_pointer_manager_v1 *relative_pointer_manager); +void wlr_relative_pointer_v1_send_relative_motion(struct wl_resource *resource, + uint64_t time, double dx, double dy, double dx_unaccel, double + dy_unaccel); + #endif diff --git a/include/wlr/types/wlr_seat.h b/include/wlr/types/wlr_seat.h index 9fc1ba95..54e04e24 100644 --- a/include/wlr/types/wlr_seat.h +++ b/include/wlr/types/wlr_seat.h @@ -314,6 +314,18 @@ void wlr_seat_pointer_clear_focus(struct wlr_seat *wlr_seat); void wlr_seat_pointer_send_motion(struct wlr_seat *wlr_seat, uint32_t time, double sx, double sy); +/** Send relative motion events to the surface with pointer focus. Coordinates + * for the motion event are relative to current pointer location, both + * accelerated and unaccelerated. Compositors should use + * `wlr_seat_pointer_notify_relative_motion()` to send relative motion events + * to respect relative pointer requests by clients. + * + * Note that the timestamp is 64 bit, split into high 32 bits and low 32 bits. + */ +void wlr_seat_pointer_notify_relative_motion(struct wlr_seat *wlr_seat, + uint64_t time, double dx, double dy, double dx_unaccel, + double dy_unaccel); + /** * Send a button event to the surface with pointer focus. Coordinates for the * button event are surface-local. Returns the serial. Compositors should use |