From e44834595df49bfb9a6130b53814c9c805fed5b8 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Mon, 19 Dec 2022 10:05:14 +0100 Subject: [PATCH] seat/keyboard: constify args in wlr_seat_keyboard_enter() --- include/wlr/types/wlr_seat.h | 4 ++-- 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);