seat: remove wlr_seat_validate_grab_serial()

It makes little sense to have a catch-all grab vaildation function,
considering that e.g. tablet tool implicit grabs are possible as well.
Besides, the function has always returned true anyway.
This commit is contained in:
Kirill Primak 2023-07-17 19:07:42 +03:00 committed by Simon Ser
parent 36e7a672c7
commit 86c30b8715
3 changed files with 0 additions and 28 deletions

View file

@ -693,12 +693,6 @@ void wlr_seat_touch_end_grab(struct wlr_seat *wlr_seat);
*/ */
bool wlr_seat_touch_has_grab(struct wlr_seat *seat); bool wlr_seat_touch_has_grab(struct wlr_seat *seat);
/**
* Check whether this serial is valid to start a grab action such as an
* interactive move or resize.
*/
bool wlr_seat_validate_grab_serial(struct wlr_seat *seat, uint32_t serial);
/** /**
* Check whether this serial is valid to start a pointer grab action. * Check whether this serial is valid to start a pointer grab action.
*/ */

View file

@ -444,13 +444,6 @@ struct wlr_seat_client *wlr_seat_client_from_resource(
return wl_resource_get_user_data(resource); return wl_resource_get_user_data(resource);
} }
bool wlr_seat_validate_grab_serial(struct wlr_seat *seat, uint32_t serial) {
// TODO
//return serial == seat->pointer_state.grab_serial ||
// serial == seat->touch_state.grab_serial;
return true;
}
uint32_t wlr_seat_client_next_serial(struct wlr_seat_client *client) { uint32_t wlr_seat_client_next_serial(struct wlr_seat_client *client) {
uint32_t serial = wl_display_next_serial(wl_client_get_display(client->client)); uint32_t serial = wl_display_next_serial(wl_client_get_display(client->client));
struct wlr_serial_ringset *set = &client->serials; struct wlr_serial_ringset *set = &client->serials;

View file

@ -265,11 +265,6 @@ static void xdg_toplevel_handle_show_window_menu(struct wl_client *client,
return; return;
} }
if (!wlr_seat_validate_grab_serial(seat->seat, serial)) {
wlr_log(WLR_DEBUG, "invalid serial for grab");
return;
}
struct wlr_xdg_toplevel_show_window_menu_event event = { struct wlr_xdg_toplevel_show_window_menu_event event = {
.toplevel = toplevel, .toplevel = toplevel,
.seat = seat, .seat = seat,
@ -296,11 +291,6 @@ static void xdg_toplevel_handle_move(struct wl_client *client,
return; return;
} }
if (!wlr_seat_validate_grab_serial(seat->seat, serial)) {
wlr_log(WLR_DEBUG, "invalid serial for grab");
return;
}
struct wlr_xdg_toplevel_move_event event = { struct wlr_xdg_toplevel_move_event event = {
.toplevel = toplevel, .toplevel = toplevel,
.seat = seat, .seat = seat,
@ -342,11 +332,6 @@ static void xdg_toplevel_handle_resize(struct wl_client *client,
return; return;
} }
if (!wlr_seat_validate_grab_serial(seat->seat, serial)) {
wlr_log(WLR_DEBUG, "invalid serial for grab");
return;
}
struct wlr_xdg_toplevel_resize_event event = { struct wlr_xdg_toplevel_resize_event event = {
.toplevel = toplevel, .toplevel = toplevel,
.seat = seat, .seat = seat,