seat: drop last_event

This commit is contained in:
Kirill Primak 2024-11-12 10:33:18 +03:00 committed by Simon Ser
parent 85e2b662f1
commit 0b720ae5ea
4 changed files with 0 additions and 12 deletions

View File

@ -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;

View File

@ -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) {

View File

@ -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);

View File

@ -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) {