mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-26 06:35:58 +01:00
Use wl_display_next_serial
This commit is contained in:
parent
e5e6dab7fd
commit
c38d7949ef
1 changed files with 7 additions and 5 deletions
|
@ -350,8 +350,8 @@ static void handle_keyboard_key(struct keyboard_state *keyboard,
|
||||||
if (res != sample->focus && seat_handle && seat_handle->keyboard) {
|
if (res != sample->focus && seat_handle && seat_handle->keyboard) {
|
||||||
struct wl_array keys;
|
struct wl_array keys;
|
||||||
wl_array_init(&keys);
|
wl_array_init(&keys);
|
||||||
wl_keyboard_send_enter(seat_handle->keyboard, ++sample->serial, res,
|
uint32_t serial = wl_display_next_serial(state->display);
|
||||||
&keys);
|
wl_keyboard_send_enter(seat_handle->keyboard, serial, res, &keys);
|
||||||
sample->focus = res;
|
sample->focus = res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -364,10 +364,12 @@ static void handle_keyboard_key(struct keyboard_state *keyboard,
|
||||||
XKB_STATE_MODS_LOCKED);
|
XKB_STATE_MODS_LOCKED);
|
||||||
uint32_t group = xkb_state_serialize_layout(keyboard->xkb_state,
|
uint32_t group = xkb_state_serialize_layout(keyboard->xkb_state,
|
||||||
XKB_STATE_LAYOUT_EFFECTIVE);
|
XKB_STATE_LAYOUT_EFFECTIVE);
|
||||||
wl_keyboard_send_modifiers(seat_handle->keyboard, ++sample->serial,
|
uint32_t modifiers_serial = wl_display_next_serial(state->display);
|
||||||
|
uint32_t key_serial = wl_display_next_serial(state->display);
|
||||||
|
wl_keyboard_send_modifiers(seat_handle->keyboard, modifiers_serial,
|
||||||
depressed, latched, locked, group);
|
depressed, latched, locked, group);
|
||||||
wl_keyboard_send_key(seat_handle->keyboard, ++sample->serial, 0,
|
wl_keyboard_send_key(seat_handle->keyboard, key_serial, 0, keycode,
|
||||||
keycode, key_state);
|
key_state);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sym == XKB_KEY_Super_L || sym == XKB_KEY_Super_R) {
|
if (sym == XKB_KEY_Super_L || sym == XKB_KEY_Super_R) {
|
||||||
|
|
Loading…
Reference in a new issue