diff options
| author | usering-around <useruseringaround@proton.me> | 2025-09-11 20:42:20 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-09-11 19:42:20 +0200 |
| commit | 38169c8fddcd21bd2c4ccebfa0c32100d5356aa0 (patch) | |
| tree | e268f85e575db585db80133cbd8b036a6d1c63ca /src/protocols/InputMethodV2.cpp | |
| parent | c7b99691290ef16e04cf0cb4a5007ef29fccc229 (diff) | |
input: support xkb v2 format (#11482)
Diffstat (limited to 'src/protocols/InputMethodV2.cpp')
| -rw-r--r-- | src/protocols/InputMethodV2.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/protocols/InputMethodV2.cpp b/src/protocols/InputMethodV2.cpp index 6eb419dc..d66d1f24 100644 --- a/src/protocols/InputMethodV2.cpp +++ b/src/protocols/InputMethodV2.cpp @@ -33,22 +33,22 @@ void CInputMethodKeyboardGrabV2::sendKeyboardData(SP<IKeyboard> keyboard) { m_lastKeyboard = keyboard; - auto keymapFD = allocateSHMFile(keyboard->m_xkbKeymapString.length() + 1); + auto keymapFD = allocateSHMFile(keyboard->m_xkbKeymapV1String.length() + 1); if UNLIKELY (!keymapFD.isValid()) { LOGM(ERR, "Failed to create a keymap file for keyboard grab"); return; } - void* data = mmap(nullptr, keyboard->m_xkbKeymapString.length() + 1, PROT_READ | PROT_WRITE, MAP_SHARED, keymapFD.get(), 0); + void* data = mmap(nullptr, keyboard->m_xkbKeymapV1String.length() + 1, PROT_READ | PROT_WRITE, MAP_SHARED, keymapFD.get(), 0); if UNLIKELY (data == MAP_FAILED) { LOGM(ERR, "Failed to mmap a keymap file for keyboard grab"); return; } - memcpy(data, keyboard->m_xkbKeymapString.c_str(), keyboard->m_xkbKeymapString.length()); - munmap(data, keyboard->m_xkbKeymapString.length() + 1); + memcpy(data, keyboard->m_xkbKeymapV1String.c_str(), keyboard->m_xkbKeymapV1String.length()); + munmap(data, keyboard->m_xkbKeymapV1String.length() + 1); - m_resource->sendKeymap(WL_KEYBOARD_KEYMAP_FORMAT_XKB_V1, keymapFD.get(), keyboard->m_xkbKeymapString.length() + 1); + m_resource->sendKeymap(WL_KEYBOARD_KEYMAP_FORMAT_XKB_V1, keymapFD.get(), keyboard->m_xkbKeymapV1String.length() + 1); sendMods(keyboard->m_modifiersState.depressed, keyboard->m_modifiersState.latched, keyboard->m_modifiersState.locked, keyboard->m_modifiersState.group); |
