seat/keyboard: constify wlr_seat_keyboard_notify_modifiers()

Simon Ser 2 years ago committed by Isaac Freund
parent e44834595d
commit 695d28c250

@ -116,7 +116,7 @@ struct wlr_keyboard_grab_interface {
void (*key)(struct wlr_seat_keyboard_grab *grab, uint32_t time_msec, void (*key)(struct wlr_seat_keyboard_grab *grab, uint32_t time_msec,
uint32_t key, uint32_t state); uint32_t key, uint32_t state);
void (*modifiers)(struct wlr_seat_keyboard_grab *grab, void (*modifiers)(struct wlr_seat_keyboard_grab *grab,
struct wlr_keyboard_modifiers *modifiers); const struct wlr_keyboard_modifiers *modifiers);
void (*cancel)(struct wlr_seat_keyboard_grab *grab); void (*cancel)(struct wlr_seat_keyboard_grab *grab);
}; };
@ -541,7 +541,7 @@ void wlr_seat_keyboard_notify_key(struct wlr_seat *seat, uint32_t time_msec,
* any keyboard grabs. * any keyboard grabs.
*/ */
void wlr_seat_keyboard_notify_modifiers(struct wlr_seat *seat, void wlr_seat_keyboard_notify_modifiers(struct wlr_seat *seat,
struct wlr_keyboard_modifiers *modifiers); const struct wlr_keyboard_modifiers *modifiers);
/** /**
* Notify the seat that the keyboard focus has changed and request it to be the * Notify the seat that the keyboard focus has changed and request it to be the

@ -326,7 +326,7 @@ static void drag_handle_keyboard_key(struct wlr_seat_keyboard_grab *grab,
} }
static void drag_handle_keyboard_modifiers(struct wlr_seat_keyboard_grab *grab, static void drag_handle_keyboard_modifiers(struct wlr_seat_keyboard_grab *grab,
struct wlr_keyboard_modifiers *modifiers) { const struct wlr_keyboard_modifiers *modifiers) {
//struct wlr_keyboard *keyboard = grab->seat->keyboard_state.keyboard; //struct wlr_keyboard *keyboard = grab->seat->keyboard_state.keyboard;
// TODO change the dnd action based on what modifier is pressed on the // TODO change the dnd action based on what modifier is pressed on the
// keyboard // keyboard

@ -25,7 +25,7 @@ static void default_keyboard_key(struct wlr_seat_keyboard_grab *grab,
} }
static void default_keyboard_modifiers(struct wlr_seat_keyboard_grab *grab, static void default_keyboard_modifiers(struct wlr_seat_keyboard_grab *grab,
struct wlr_keyboard_modifiers *modifiers) { const struct wlr_keyboard_modifiers *modifiers) {
wlr_seat_keyboard_send_modifiers(grab->seat, modifiers); wlr_seat_keyboard_send_modifiers(grab->seat, modifiers);
} }
@ -321,7 +321,7 @@ bool wlr_seat_keyboard_has_grab(struct wlr_seat *seat) {
} }
void wlr_seat_keyboard_notify_modifiers(struct wlr_seat *seat, void wlr_seat_keyboard_notify_modifiers(struct wlr_seat *seat,
struct wlr_keyboard_modifiers *modifiers) { const struct wlr_keyboard_modifiers *modifiers) {
clock_gettime(CLOCK_MONOTONIC, &seat->last_event); clock_gettime(CLOCK_MONOTONIC, &seat->last_event);
struct wlr_seat_keyboard_grab *grab = seat->keyboard_state.grab; struct wlr_seat_keyboard_grab *grab = seat->keyboard_state.grab;
grab->interface->modifiers(grab, modifiers); grab->interface->modifiers(grab, modifiers);

@ -121,7 +121,7 @@ static void xdg_keyboard_grab_key(struct wlr_seat_keyboard_grab *grab, uint32_t
} }
static void xdg_keyboard_grab_modifiers(struct wlr_seat_keyboard_grab *grab, static void xdg_keyboard_grab_modifiers(struct wlr_seat_keyboard_grab *grab,
struct wlr_keyboard_modifiers *modifiers) { const struct wlr_keyboard_modifiers *modifiers) {
wlr_seat_keyboard_send_modifiers(grab->seat, modifiers); wlr_seat_keyboard_send_modifiers(grab->seat, modifiers);
} }

Loading…
Cancel
Save