summaryrefslogtreecommitdiff
path: root/src/devices/IKeyboard.cpp
diff options
context:
space:
mode:
authorusering-around <226918848+usering-around@users.noreply.github.com>2025-09-19 17:58:03 +0300
committerGitHub <noreply@github.com>2025-09-19 16:58:03 +0200
commit8fc7b2c171abe61e9fc9ed8e4e8c097ee74a45a2 (patch)
treeb1aa2df9e738af6a20385ae058250f0e348a7b6f /src/devices/IKeyboard.cpp
parentafd1e71761ce4cb71bb3316dc5e4a7cc81235e7a (diff)
input: fix virtual keyboard keymaps (#11763)
Diffstat (limited to 'src/devices/IKeyboard.cpp')
-rw-r--r--src/devices/IKeyboard.cpp15
1 files changed, 1 insertions, 14 deletions
diff --git a/src/devices/IKeyboard.cpp b/src/devices/IKeyboard.cpp
index 0fc30ca9..7e6320e2 100644
--- a/src/devices/IKeyboard.cpp
+++ b/src/devices/IKeyboard.cpp
@@ -43,15 +43,11 @@ void IKeyboard::clearManuallyAllocd() {
if (m_xkbKeymap)
xkb_keymap_unref(m_xkbKeymap);
- if (m_xkbKeymapV1)
- xkb_keymap_unref(m_xkbKeymapV1);
-
if (m_xkbSymState)
xkb_state_unref(m_xkbSymState);
m_xkbSymState = nullptr;
m_xkbKeymap = nullptr;
- m_xkbKeymapV1 = nullptr;
m_xkbState = nullptr;
m_xkbStaticState = nullptr;
m_xkbKeymapFD.reset();
@@ -116,15 +112,6 @@ void IKeyboard::setKeymap(const SStringRuleNames& rules) {
m_xkbKeymap = xkb_keymap_new_from_names2(CONTEXT, &XKBRULES, XKB_KEYMAP_FORMAT_TEXT_V2, XKB_KEYMAP_COMPILE_NO_FLAGS);
}
- auto cKeymapStr = xkb_keymap_get_as_string(m_xkbKeymap, XKB_KEYMAP_FORMAT_TEXT_V1);
- if (!cKeymapStr) {
- Debug::log(ERR, "Couldn't convert keymap to V1 format");
- m_xkbKeymapV1 = xkb_keymap_new_from_names2(CONTEXT, &XKBRULES, XKB_KEYMAP_FORMAT_TEXT_V1, XKB_KEYMAP_COMPILE_NO_FLAGS);
- } else {
- m_xkbKeymapV1 = xkb_keymap_new_from_string(CONTEXT, cKeymapStr, XKB_KEYMAP_FORMAT_TEXT_V1, XKB_KEYMAP_COMPILE_NO_FLAGS);
- free(cKeymapStr);
- }
-
updateXKBTranslationState(m_xkbKeymap);
const auto NUMLOCKON = g_pConfigManager->getDeviceInt(m_hlName, "numlock_by_default", "input:numlock_by_default");
@@ -169,7 +156,7 @@ void IKeyboard::updateKeymapFD() {
auto cKeymapStr = xkb_keymap_get_as_string(m_xkbKeymap, XKB_KEYMAP_FORMAT_TEXT_V2);
m_xkbKeymapString = cKeymapStr;
free(cKeymapStr);
- auto cKeymapV1Str = xkb_keymap_get_as_string(m_xkbKeymapV1, XKB_KEYMAP_FORMAT_TEXT_V1);
+ auto cKeymapV1Str = xkb_keymap_get_as_string(m_xkbKeymap, XKB_KEYMAP_FORMAT_TEXT_V1);
m_xkbKeymapV1String = cKeymapV1Str;
free(cKeymapV1Str);