diff options
author | Simon Ser <contact@emersion.fr> | 2022-12-19 10:05:14 +0100 |
---|---|---|
committer | Isaac Freund <mail@isaacfreund.com> | 2023-01-26 15:06:45 +0000 |
commit | e44834595df49bfb9a6130b53814c9c805fed5b8 (patch) | |
tree | 998d91dd0f2f79364d4eec52a109c8859f306e4a | |
parent | 12e04d8f83a7359c8c4b7c3c9aa12c370c9e7800 (diff) |
seat/keyboard: constify args in wlr_seat_keyboard_enter()
-rw-r--r-- | include/wlr/types/wlr_seat.h | 4 | ||||
-rw-r--r-- | types/seat/wlr_seat_keyboard.c | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/include/wlr/types/wlr_seat.h b/include/wlr/types/wlr_seat.h index fb44074f..588bdc63 100644 --- a/include/wlr/types/wlr_seat.h +++ b/include/wlr/types/wlr_seat.h @@ -519,8 +519,8 @@ void wlr_seat_keyboard_send_modifiers(struct wlr_seat *seat, * probably want wlr_seat_keyboard_notify_enter() instead. */ void wlr_seat_keyboard_enter(struct wlr_seat *seat, - struct wlr_surface *surface, uint32_t keycodes[], size_t num_keycodes, - struct wlr_keyboard_modifiers *modifiers); + struct wlr_surface *surface, const uint32_t keycodes[], size_t num_keycodes, + const struct wlr_keyboard_modifiers *modifiers); /** * Clear the focused surface for the keyboard and leave all entered surfaces. diff --git a/types/seat/wlr_seat_keyboard.c b/types/seat/wlr_seat_keyboard.c index 7fc94a5e..a8d79c79 100644 --- a/types/seat/wlr_seat_keyboard.c +++ b/types/seat/wlr_seat_keyboard.c @@ -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, - struct wlr_surface *surface, uint32_t keycodes[], size_t num_keycodes, - struct wlr_keyboard_modifiers *modifiers) { + struct wlr_surface *surface, const uint32_t keycodes[], size_t num_keycodes, + const struct wlr_keyboard_modifiers *modifiers) { if (seat->keyboard_state.focused_surface == surface) { // this surface already got an enter notify return; @@ -255,7 +255,7 @@ void wlr_seat_keyboard_enter(struct wlr_seat *seat, // enter the current surface if (client != NULL) { struct wl_array keys = { - .data = keycodes, + .data = (void *)keycodes, .size = num_keycodes * sizeof(keycodes[0]), }; uint32_t serial = wlr_seat_client_next_serial(client); |