From 0b720ae5ea161619d8092ae8d44fd7e65117818e Mon Sep 17 00:00:00 2001 From: Kirill Primak Date: Tue, 12 Nov 2024 10:33:18 +0300 Subject: [PATCH] seat: drop last_event --- include/wlr/types/wlr_seat.h | 1 - types/seat/wlr_seat_keyboard.c | 3 --- types/seat/wlr_seat_pointer.c | 5 ----- types/seat/wlr_seat_touch.c | 3 --- 4 files changed, 12 deletions(-) diff --git a/include/wlr/types/wlr_seat.h b/include/wlr/types/wlr_seat.h index 69ee69fdd..74b4341dd 100644 --- a/include/wlr/types/wlr_seat.h +++ b/include/wlr/types/wlr_seat.h @@ -250,7 +250,6 @@ struct wlr_seat { char *name; uint32_t capabilities; uint32_t accumulated_capabilities; - struct timespec last_event; struct wlr_data_source *selection_source; uint32_t selection_serial; diff --git a/types/seat/wlr_seat_keyboard.c b/types/seat/wlr_seat_keyboard.c index cae4c0db1..56f83b7f4 100644 --- a/types/seat/wlr_seat_keyboard.c +++ b/types/seat/wlr_seat_keyboard.c @@ -319,19 +319,16 @@ bool wlr_seat_keyboard_has_grab(struct wlr_seat *seat) { void wlr_seat_keyboard_notify_modifiers(struct wlr_seat *seat, const struct wlr_keyboard_modifiers *modifiers) { - clock_gettime(CLOCK_MONOTONIC, &seat->last_event); struct wlr_seat_keyboard_grab *grab = seat->keyboard_state.grab; grab->interface->modifiers(grab, modifiers); } void wlr_seat_keyboard_notify_key(struct wlr_seat *seat, uint32_t time, uint32_t key, uint32_t state) { - clock_gettime(CLOCK_MONOTONIC, &seat->last_event); struct wlr_seat_keyboard_grab *grab = seat->keyboard_state.grab; grab->interface->key(grab, time, key, state); } - static void seat_client_send_keymap(struct wlr_seat_client *client, struct wlr_keyboard *keyboard) { if (!keyboard) { diff --git a/types/seat/wlr_seat_pointer.c b/types/seat/wlr_seat_pointer.c index defe14e89..41729dcd9 100644 --- a/types/seat/wlr_seat_pointer.c +++ b/types/seat/wlr_seat_pointer.c @@ -464,15 +464,12 @@ void wlr_seat_pointer_notify_clear_focus(struct wlr_seat *wlr_seat) { void wlr_seat_pointer_notify_motion(struct wlr_seat *wlr_seat, uint32_t time, double sx, double sy) { - clock_gettime(CLOCK_MONOTONIC, &wlr_seat->last_event); struct wlr_seat_pointer_grab *grab = wlr_seat->pointer_state.grab; grab->interface->motion(grab, time, sx, sy); } uint32_t wlr_seat_pointer_notify_button(struct wlr_seat *wlr_seat, uint32_t time, uint32_t button, enum wl_pointer_button_state state) { - clock_gettime(CLOCK_MONOTONIC, &wlr_seat->last_event); - struct wlr_seat_pointer_state* pointer_state = &wlr_seat->pointer_state; if (state == WL_POINTER_BUTTON_STATE_PRESSED) { @@ -527,14 +524,12 @@ void wlr_seat_pointer_notify_axis(struct wlr_seat *wlr_seat, uint32_t time, enum wl_pointer_axis orientation, double value, int32_t value_discrete, enum wl_pointer_axis_source source, enum wl_pointer_axis_relative_direction relative_direction) { - clock_gettime(CLOCK_MONOTONIC, &wlr_seat->last_event); struct wlr_seat_pointer_grab *grab = wlr_seat->pointer_state.grab; grab->interface->axis(grab, time, orientation, value, value_discrete, source, relative_direction); } void wlr_seat_pointer_notify_frame(struct wlr_seat *wlr_seat) { - clock_gettime(CLOCK_MONOTONIC, &wlr_seat->last_event); struct wlr_seat_pointer_grab *grab = wlr_seat->pointer_state.grab; if (grab->interface->frame) { grab->interface->frame(grab); diff --git a/types/seat/wlr_seat_touch.c b/types/seat/wlr_seat_touch.c index 3927bd230..6aac48841 100644 --- a/types/seat/wlr_seat_touch.c +++ b/types/seat/wlr_seat_touch.c @@ -181,7 +181,6 @@ struct wlr_touch_point *wlr_seat_touch_get_point( uint32_t wlr_seat_touch_notify_down(struct wlr_seat *seat, struct wlr_surface *surface, uint32_t time, int32_t touch_id, double sx, double sy) { - clock_gettime(CLOCK_MONOTONIC, &seat->last_event); struct wlr_seat_touch_grab *grab = seat->touch_state.grab; struct wlr_touch_point *point = touch_point_create(seat, touch_id, surface, sx, sy); @@ -207,7 +206,6 @@ uint32_t wlr_seat_touch_notify_down(struct wlr_seat *seat, uint32_t wlr_seat_touch_notify_up(struct wlr_seat *seat, uint32_t time, int32_t touch_id) { - clock_gettime(CLOCK_MONOTONIC, &seat->last_event); struct wlr_seat_touch_grab *grab = seat->touch_state.grab; struct wlr_touch_point *point = wlr_seat_touch_get_point(seat, touch_id); if (!point) { @@ -221,7 +219,6 @@ uint32_t wlr_seat_touch_notify_up(struct wlr_seat *seat, uint32_t time, void wlr_seat_touch_notify_motion(struct wlr_seat *seat, uint32_t time, int32_t touch_id, double sx, double sy) { - clock_gettime(CLOCK_MONOTONIC, &seat->last_event); struct wlr_seat_touch_grab *grab = seat->touch_state.grab; struct wlr_touch_point *point = wlr_seat_touch_get_point(seat, touch_id); if (!point) {