diff options
author | Drew DeVault <sir@cmpwn.com> | 2018-01-17 09:38:58 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-17 09:38:58 -0500 |
commit | 1fbd6cb0f0a517188aa17b57c3e116619d50f0bd (patch) | |
tree | 819b483e84497623a7c5454f1dd0e7aef9b60f9b /rootston/seat.c | |
parent | f2698a896085a5a2dd651a7f1d4fb623d567acf4 (diff) | |
parent | b6f29e87e85b599170a0ffd1f4c94c46c216d51a (diff) |
Merge pull request #553 from acrisci/modifier-fixes
compositor modifier hooks
Diffstat (limited to 'rootston/seat.c')
-rw-r--r-- | rootston/seat.c | 11 |
1 files changed, 10 insertions, 1 deletions
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) { |