mirror of
https://github.com/gwenhael-le-moine/sway-patched-tray-menu.git
synced 2024-12-25 21:58:31 +01:00
input/text_input: ensure keyboard is set before sending modifiers
Clients get confused when modifier events are sent before the keymap.
This commit is contained in:
parent
700f4805bc
commit
df69367d92
1 changed files with 3 additions and 1 deletions
|
@ -66,11 +66,13 @@ static void handle_im_keyboard_grab_destroy(struct wl_listener *listener, void *
|
||||||
struct sway_input_method_relay *relay = wl_container_of(listener, relay,
|
struct sway_input_method_relay *relay = wl_container_of(listener, relay,
|
||||||
input_method_keyboard_grab_destroy);
|
input_method_keyboard_grab_destroy);
|
||||||
struct wlr_input_method_keyboard_grab_v2 *keyboard_grab = data;
|
struct wlr_input_method_keyboard_grab_v2 *keyboard_grab = data;
|
||||||
|
struct wlr_seat *wlr_seat = keyboard_grab->input_method->seat;
|
||||||
wl_list_remove(&relay->input_method_keyboard_grab_destroy.link);
|
wl_list_remove(&relay->input_method_keyboard_grab_destroy.link);
|
||||||
|
|
||||||
if (keyboard_grab->keyboard) {
|
if (keyboard_grab->keyboard) {
|
||||||
// send modifier state to original client
|
// send modifier state to original client
|
||||||
wlr_seat_keyboard_notify_modifiers(keyboard_grab->input_method->seat,
|
wlr_seat_set_keyboard(wlr_seat, keyboard_grab->keyboard);
|
||||||
|
wlr_seat_keyboard_notify_modifiers(wlr_seat,
|
||||||
&keyboard_grab->keyboard->modifiers);
|
&keyboard_grab->keyboard->modifiers);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue