mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-17 06:59:43 -05:00
Removed relative pointers from wlr_seat
This commit is contained in:
parent
f4cf3c0886
commit
09bdbf24f4
6 changed files with 40 additions and 33 deletions
|
|
@ -79,9 +79,6 @@ static void seat_client_handle_resource_destroy(
|
|||
wl_resource_for_each_safe(resource, tmp, &client->pointers) {
|
||||
wl_resource_destroy(resource);
|
||||
}
|
||||
wl_resource_for_each_safe(resource, tmp, &client->relative_pointers_v1) {
|
||||
wl_resource_destroy(resource);
|
||||
}
|
||||
wl_resource_for_each_safe(resource, tmp, &client->keyboards) {
|
||||
wl_resource_destroy(resource);
|
||||
}
|
||||
|
|
@ -134,7 +131,6 @@ static void seat_handle_bind(struct wl_client *client, void *_wlr_seat,
|
|||
seat_client->seat = wlr_seat;
|
||||
wl_list_init(&seat_client->resources);
|
||||
wl_list_init(&seat_client->pointers);
|
||||
wl_list_init(&seat_client->relative_pointers_v1);
|
||||
wl_list_init(&seat_client->keyboards);
|
||||
wl_list_init(&seat_client->touches);
|
||||
wl_list_init(&seat_client->data_devices);
|
||||
|
|
|
|||
|
|
@ -305,28 +305,6 @@ void wlr_seat_pointer_notify_motion(struct wlr_seat *wlr_seat, uint32_t time,
|
|||
grab->interface->motion(grab, time, sx, sy);
|
||||
}
|
||||
|
||||
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) {
|
||||
struct wlr_seat_client *client = wlr_seat->pointer_state.focused_client;
|
||||
if (client == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
struct wl_resource *resource;
|
||||
wl_resource_for_each(resource, &client->relative_pointers_v1) {
|
||||
struct wlr_relative_pointer_v1 *relative_pointer =
|
||||
wlr_relative_pointer_v1_from_resource(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(relative_pointer->pointer);
|
||||
}
|
||||
}
|
||||
|
||||
uint32_t wlr_seat_pointer_notify_button(struct wlr_seat *wlr_seat,
|
||||
uint32_t time, uint32_t button, uint32_t state) {
|
||||
clock_gettime(CLOCK_MONOTONIC, &wlr_seat->last_event);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue