aboutsummaryrefslogtreecommitdiff
path: root/rootston
diff options
context:
space:
mode:
Diffstat (limited to 'rootston')
-rw-r--r--rootston/keyboard.c3
-rw-r--r--rootston/seat.c11
2 files changed, 12 insertions, 2 deletions
diff --git a/rootston/keyboard.c b/rootston/keyboard.c
index 14199afd..f1123599 100644
--- a/rootston/keyboard.c
+++ b/rootston/keyboard.c
@@ -288,7 +288,8 @@ void roots_keyboard_handle_key(struct roots_keyboard *keyboard,
void roots_keyboard_handle_modifiers(struct roots_keyboard *r_keyboard) {
struct wlr_seat *seat = r_keyboard->seat->seat;
wlr_seat_set_keyboard(seat, r_keyboard->device);
- wlr_seat_keyboard_notify_modifiers(seat);
+ wlr_seat_keyboard_notify_modifiers(seat,
+ &r_keyboard->device->keyboard->modifiers);
}
static void keyboard_config_merge(struct roots_keyboard_config *config,
diff --git a/rootston/seat.c b/rootston/seat.c
index a61057bd..1a0e6253 100644
--- a/rootston/seat.c
+++ b/rootston/seat.c
@@ -662,7 +662,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) {