mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-06-06 14:43:20 +00:00
wayland: Fix the key level request layout parameter
Use the layout loop index instead of the current layout, which could be invalid if no layout event was received before the keymap event. Fixes #13418
This commit is contained in:
parent
c80d6954cb
commit
c8e2d13173
1 changed files with 1 additions and 1 deletions
|
|
@ -1435,7 +1435,7 @@ static void Wayland_KeymapIterator(struct xkb_keymap *keymap, xkb_keycode_t key,
|
|||
}
|
||||
|
||||
for (xkb_layout_index_t layout = 0; layout < seat->keyboard.xkb.num_layouts; ++layout) {
|
||||
const xkb_level_index_t num_levels = WAYLAND_xkb_keymap_num_levels_for_key(seat->keyboard.xkb.keymap, key, seat->keyboard.xkb.current_layout);
|
||||
const xkb_level_index_t num_levels = WAYLAND_xkb_keymap_num_levels_for_key(seat->keyboard.xkb.keymap, key, layout);
|
||||
for (xkb_level_index_t level = 0; level < num_levels; ++level) {
|
||||
if (WAYLAND_xkb_keymap_key_get_syms_by_level(seat->keyboard.xkb.keymap, key, layout, level, &syms) > 0) {
|
||||
/* If the keyboard is virtual or the key didn't have a corresponding hardware scancode, try to
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue