aboutsummaryrefslogtreecommitdiff
path: root/rootston/seat.c
diff options
context:
space:
mode:
authorTony Crisci <tony@dubstepdish.com>2018-01-06 11:06:09 -0500
committerTony Crisci <tony@dubstepdish.com>2018-01-06 11:06:09 -0500
commitb40a5f084abeb5530b3a0097c946ba720c897262 (patch)
tree9b5e84d973fd9769455545f67b075e31dec2f428 /rootston/seat.c
parent2bd3a75f809dc0407d99a84997774c830f63ccd2 (diff)
keyboard grab enter with modifiers
Diffstat (limited to 'rootston/seat.c')
-rw-r--r--rootston/seat.c11
1 files changed, 10 insertions, 1 deletions
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) {