seat/keyboard: constify args in wlr_seat_keyboard_enter()

This commit is contained in:
Simon Ser 2022-12-19 10:05:14 +01:00 committed by Isaac Freund
parent 12e04d8f83
commit e44834595d
2 changed files with 5 additions and 5 deletions

View file

@ -519,8 +519,8 @@ void wlr_seat_keyboard_send_modifiers(struct wlr_seat *seat,
* probably want wlr_seat_keyboard_notify_enter() instead. * probably want wlr_seat_keyboard_notify_enter() instead.
*/ */
void wlr_seat_keyboard_enter(struct wlr_seat *seat, void wlr_seat_keyboard_enter(struct wlr_seat *seat,
struct wlr_surface *surface, uint32_t keycodes[], size_t num_keycodes, struct wlr_surface *surface, const uint32_t keycodes[], size_t num_keycodes,
struct wlr_keyboard_modifiers *modifiers); const struct wlr_keyboard_modifiers *modifiers);
/** /**
* Clear the focused surface for the keyboard and leave all entered surfaces. * Clear the focused surface for the keyboard and leave all entered surfaces.

View file

@ -228,8 +228,8 @@ void seat_client_send_keyboard_leave_raw(struct wlr_seat_client *seat_client,
} }
void wlr_seat_keyboard_enter(struct wlr_seat *seat, void wlr_seat_keyboard_enter(struct wlr_seat *seat,
struct wlr_surface *surface, uint32_t keycodes[], size_t num_keycodes, struct wlr_surface *surface, const uint32_t keycodes[], size_t num_keycodes,
struct wlr_keyboard_modifiers *modifiers) { const struct wlr_keyboard_modifiers *modifiers) {
if (seat->keyboard_state.focused_surface == surface) { if (seat->keyboard_state.focused_surface == surface) {
// this surface already got an enter notify // this surface already got an enter notify
return; return;
@ -255,7 +255,7 @@ void wlr_seat_keyboard_enter(struct wlr_seat *seat,
// enter the current surface // enter the current surface
if (client != NULL) { if (client != NULL) {
struct wl_array keys = { struct wl_array keys = {
.data = keycodes, .data = (void *)keycodes,
.size = num_keycodes * sizeof(keycodes[0]), .size = num_keycodes * sizeof(keycodes[0]),
}; };
uint32_t serial = wlr_seat_client_next_serial(client); uint32_t serial = wlr_seat_client_next_serial(client);