relative_pointer: send frame event to pointer for Xwayland
This commit is contained in:
parent
6fa1777f94
commit
fb44ce9fa8
|
@ -69,7 +69,7 @@ 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,
|
||||
void wlr_relative_pointer_v1_send_relative_motion(struct wlr_relative_pointer_v1 *relative_pointer,
|
||||
uint64_t time, double dx, double dy, double dx_unaccel, double dy_unaccel);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -315,8 +315,15 @@ void wlr_seat_pointer_notify_relative_motion(struct wlr_seat *wlr_seat,
|
|||
|
||||
struct wl_resource *resource;
|
||||
wl_resource_for_each(resource, &client->relative_pointers) {
|
||||
wlr_relative_pointer_v1_send_relative_motion(resource, time, dx, dy,
|
||||
dx_unaccel, dy_unaccel);
|
||||
struct wlr_relative_pointer_v1 *relative_pointer =
|
||||
wl_resource_get_user_data(resource);
|
||||
if (relative_pointer == NULL) {
|
||||
continue;
|
||||
}
|
||||
|
||||
wlr_relative_pointer_v1_send_relative_motion(relative_pointer, time,
|
||||
dx, dy, dx_unaccel, dy_unaccel);
|
||||
pointer_send_frame((struct wl_resource *) relative_pointer->pointer);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -182,12 +182,10 @@ void wlr_relative_pointer_v1_destroy(struct wlr_relative_pointer_manager_v1 *rel
|
|||
}
|
||||
|
||||
|
||||
void wlr_relative_pointer_v1_send_relative_motion(struct wl_resource *resource,
|
||||
void wlr_relative_pointer_v1_send_relative_motion(struct wlr_relative_pointer_v1 *relative_pointer,
|
||||
uint64_t time, double dx, double dy,
|
||||
double dx_unaccel, double dy_unaccel) {
|
||||
assert(wl_resource_instance_of(resource, &zwp_relative_pointer_v1_interface,
|
||||
&relative_pointer_v1_impl));
|
||||
zwp_relative_pointer_v1_send_relative_motion(resource,
|
||||
zwp_relative_pointer_v1_send_relative_motion(relative_pointer->resource,
|
||||
(uint32_t)(time >> 32), (uint32_t)time,
|
||||
wl_fixed_from_double(dx), wl_fixed_from_double(dy),
|
||||
wl_fixed_from_double(dx_unaccel), wl_fixed_from_double(dy_unaccel));
|
||||
|
|
Loading…
Reference in New Issue