aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTony Crisci <tony@dubstepdish.com>2018-01-06 10:31:32 -0500
committerTony Crisci <tony@dubstepdish.com>2018-01-06 10:31:32 -0500
commit2bd3a75f809dc0407d99a84997774c830f63ccd2 (patch)
treef26d6e89b12c8a6aef915618b2c86a0b88db2879
parent670d3360991d1f8c92c37ff8a3b0e5a7cfd78578 (diff)
fix send modifiers in wlr-seat set keyboard
-rw-r--r--types/wlr_seat.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/types/wlr_seat.c b/types/wlr_seat.c
index 91a7a681..6ed92493 100644
--- a/types/wlr_seat.c
+++ b/types/wlr_seat.c
@@ -774,6 +774,7 @@ void wlr_seat_set_keyboard(struct wlr_seat *seat,
if (keyboard) {
assert(device->type == WLR_INPUT_DEVICE_KEYBOARD);
+ seat->keyboard_state.keyboard = keyboard;
wl_signal_add(&device->events.destroy,
&seat->keyboard_state.keyboard_destroy);
@@ -788,14 +789,14 @@ void wlr_seat_set_keyboard(struct wlr_seat *seat,
struct wlr_seat_client *client;
wl_list_for_each(client, &seat->clients, link) {
- seat_client_send_keymap(client, device->keyboard);
- seat_client_send_repeat_info(client, device->keyboard);
+ seat_client_send_keymap(client, keyboard);
+ seat_client_send_repeat_info(client, keyboard);
}
+ wlr_seat_keyboard_send_modifiers(seat, keyboard->modifiers);
+ } else {
+ seat->keyboard_state.keyboard = NULL;
}
-
- seat->keyboard_state.keyboard = keyboard;
- wlr_seat_keyboard_send_modifiers(seat);
}
struct wlr_keyboard *wlr_seat_get_keyboard(struct wlr_seat *seat) {