mirror of
https://github.com/italicsjenga/winit-sonoma-fix.git
synced 2025-01-11 05:21:31 +11:00
On Linux, fix wrong layout for key_without_modifiers
The layout was hardcoded to zero, so the keys were sent for whatever user configured first.
This commit is contained in:
parent
0defd747c8
commit
b97df599c5
|
@ -524,10 +524,12 @@ impl<'a> KeyEventResults<'a> {
|
||||||
// This will become a pointer to an array which libxkbcommon owns, so we don't need to deallocate it.
|
// This will become a pointer to an array which libxkbcommon owns, so we don't need to deallocate it.
|
||||||
let mut keysyms = ptr::null();
|
let mut keysyms = ptr::null();
|
||||||
let keysym_count = unsafe {
|
let keysym_count = unsafe {
|
||||||
|
let layout = (XKBH.xkb_state_key_get_layout)(self.state.xkb_state, self.keycode);
|
||||||
(XKBH.xkb_keymap_key_get_syms_by_level)(
|
(XKBH.xkb_keymap_key_get_syms_by_level)(
|
||||||
self.state.xkb_keymap,
|
self.state.xkb_keymap,
|
||||||
self.keycode,
|
self.keycode,
|
||||||
0,
|
layout,
|
||||||
|
// NOTE: The level should be zero to ignore modifiers.
|
||||||
0,
|
0,
|
||||||
&mut keysyms,
|
&mut keysyms,
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue