diff options
author | Drew DeVault <sir@cmpwn.com> | 2017-12-10 09:07:31 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-10 09:07:31 -0500 |
commit | 8ccb5b0b6674999f83775cd583cc610a2e03fb54 (patch) | |
tree | 6259b337480346d75d4ed8d5504b0b3c64fc556b | |
parent | b1b1533d94621cf3048a9d74511af172407b44e6 (diff) | |
parent | 542d886984c8c94b4ab57e657d334c5d0e136d7c (diff) |
Merge pull request #478 from martinetd/modifiers
wlr_seat: send keyboard modifiers to the right client on enter
-rw-r--r-- | types/wlr_seat.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/types/wlr_seat.c b/types/wlr_seat.c index ab3e990d..05ea4745 100644 --- a/types/wlr_seat.c +++ b/types/wlr_seat.c @@ -860,7 +860,6 @@ void wlr_seat_keyboard_enter(struct wlr_seat *seat, surface->resource, &keys); wl_array_release(&keys); - wlr_seat_keyboard_send_modifiers(seat); wlr_seat_client_send_selection(client); } @@ -882,6 +881,12 @@ void wlr_seat_keyboard_enter(struct wlr_seat *seat, seat->keyboard_state.focused_client = client; seat->keyboard_state.focused_surface = surface; + + if (client && client->keyboard && seat->keyboard_state.keyboard) { + // tell new client about any modifier change last, + // as it targets seat->keyboard_state.focused_client + wlr_seat_keyboard_send_modifiers(seat); + } } void wlr_seat_keyboard_notify_enter(struct wlr_seat *seat, struct |