mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-12-23 18:39:48 +01:00
wlr_seat: send keyboard modifiers to the right client on enter
We were previously sending modifiers to the leaving client instead. Fixes #476.
This commit is contained in:
parent
b1b1533d94
commit
542d886984
1 changed files with 6 additions and 1 deletions
|
@ -860,7 +860,6 @@ void wlr_seat_keyboard_enter(struct wlr_seat *seat,
|
||||||
surface->resource, &keys);
|
surface->resource, &keys);
|
||||||
wl_array_release(&keys);
|
wl_array_release(&keys);
|
||||||
|
|
||||||
wlr_seat_keyboard_send_modifiers(seat);
|
|
||||||
wlr_seat_client_send_selection(client);
|
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_client = client;
|
||||||
seat->keyboard_state.focused_surface = surface;
|
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
|
void wlr_seat_keyboard_notify_enter(struct wlr_seat *seat, struct
|
||||||
|
|
Loading…
Reference in a new issue