From b40a5f084abeb5530b3a0097c946ba720c897262 Mon Sep 17 00:00:00 2001 From: Tony Crisci Date: Sat, 6 Jan 2018 11:06:09 -0500 Subject: keyboard grab enter with modifiers --- rootston/seat.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'rootston') diff --git a/rootston/seat.c b/rootston/seat.c index 2728ca96..0972fce2 100644 --- a/rootston/seat.c +++ b/rootston/seat.c @@ -616,7 +616,16 @@ void roots_seat_set_focus(struct roots_seat *seat, struct roots_view *view) { seat->has_focus = true; wl_list_remove(&seat_view->link); wl_list_insert(&seat->views, &seat_view->link); - wlr_seat_keyboard_notify_enter(seat->seat, view->wlr_surface); + + struct wlr_keyboard *keyboard = wlr_seat_get_keyboard(seat->seat); + if (keyboard != NULL) { + wlr_seat_keyboard_notify_enter(seat->seat, view->wlr_surface, + keyboard->keycodes, keyboard->num_keycodes, + keyboard->modifiers); + } else { + wlr_seat_keyboard_notify_enter(seat->seat, view->wlr_surface, + NULL, 0, NULL); + } } void roots_seat_cycle_focus(struct roots_seat *seat) { -- cgit v1.2.3