diff options
Diffstat (limited to 'rootston')
-rw-r--r-- | rootston/desktop.c | 1 | ||||
-rw-r--r-- | rootston/keyboard.c | 23 |
2 files changed, 9 insertions, 15 deletions
diff --git a/rootston/desktop.c b/rootston/desktop.c index 29f78ac7..b36a6932 100644 --- a/rootston/desktop.c +++ b/rootston/desktop.c @@ -133,7 +133,6 @@ void view_teardown(struct roots_view *view) { struct roots_view *prev_view = views->items[views->length-2]; struct roots_input *input = prev_view->desktop->server->input; set_view_focus(input, prev_view->desktop, prev_view); - wlr_seat_keyboard_notify_enter(input->wl_seat, prev_view->wlr_surface); } struct roots_view *view_at(struct roots_desktop *desktop, double lx, double ly, diff --git a/rootston/keyboard.c b/rootston/keyboard.c index 6c419df8..bde912aa 100644 --- a/rootston/keyboard.c +++ b/rootston/keyboard.c @@ -135,8 +135,8 @@ static bool keyboard_keysyms_simple(struct roots_keyboard *keyboard, const xkb_keysym_t *syms; xkb_layout_index_t layout_index = xkb_state_key_get_layout( keyboard->device->keyboard->xkb_state, keycode); - int syms_len = xkb_keymap_key_get_syms_by_level(keyboard->device->keyboard->keymap, - keycode, layout_index, 0, &syms); + int syms_len = xkb_keymap_key_get_syms_by_level( + keyboard->device->keyboard->keymap, keycode, layout_index, 0, &syms); bool handled = false; for (int i = 0; i < syms_len; i++) { @@ -195,7 +195,8 @@ static void keyboard_key_notify(struct wl_listener *listener, void *data) { bool handled = keyboard_keysyms_xkb(keyboard, keycode, event->state); if (!handled) { - bool key_handled = keyboard_keysyms_simple(keyboard, keycode, event->state); + bool key_handled = keyboard_keysyms_simple(keyboard, keycode, + event->state); handled = handled || key_handled; } @@ -207,17 +208,11 @@ static void keyboard_key_notify(struct wl_listener *listener, void *data) { } static void keyboard_modifiers_notify(struct wl_listener *listener, void *data) { - struct roots_keyboard *r_keyboard = - wl_container_of(listener, r_keyboard, modifiers); - struct wlr_seat *seat = r_keyboard->input->wl_seat; - struct wlr_keyboard *keyboard = r_keyboard->device->keyboard; - wlr_seat_set_keyboard(seat, r_keyboard->device); - wlr_seat_keyboard_notify_modifiers(seat, - keyboard->modifiers.depressed, - keyboard->modifiers.latched, - keyboard->modifiers.locked, - keyboard->modifiers.group); - + struct roots_keyboard *keyboard = + wl_container_of(listener, keyboard, modifiers); + struct wlr_seat *seat = keyboard->input->wl_seat; + wlr_seat_set_keyboard(seat, keyboard->device); + wlr_seat_keyboard_notify_modifiers(seat); } static void keyboard_config_merge(struct keyboard_config *config, |