mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-09 15:26:00 +01:00
fix memory issue with hyprctl devices
This commit is contained in:
parent
6e2467cc24
commit
ea45c6bfe0
2 changed files with 2 additions and 2 deletions
|
@ -386,7 +386,7 @@ R"#( {
|
||||||
|
|
||||||
for (auto& k : g_pInputManager->m_lKeyboards) {
|
for (auto& k : g_pInputManager->m_lKeyboards) {
|
||||||
const auto KM = g_pInputManager->getActiveLayoutForKeyboard(&k);
|
const auto KM = g_pInputManager->getActiveLayoutForKeyboard(&k);
|
||||||
result += getFormat("\tKeyboard at %x:\n\t\t%s\n\t\t\trules: r \"%s\", m \"%s\", l \"%s\", v \"%s\", o \"%s\"\n\t\t\tactive keymap: %s\n", &k, k.keyboard->name, k.currentRules.rules.c_str(), k.currentRules.model.c_str(), k.currentRules.layout.c_str(), k.currentRules.variant.c_str(), k.currentRules.options.c_str(), KM);
|
result += getFormat("\tKeyboard at %x:\n\t\t%s\n\t\t\trules: r \"%s\", m \"%s\", l \"%s\", v \"%s\", o \"%s\"\n\t\t\tactive keymap: %s\n", &k, k.keyboard->name, k.currentRules.rules.c_str(), k.currentRules.model.c_str(), k.currentRules.layout.c_str(), k.currentRules.variant.c_str(), k.currentRules.options.c_str(), KM.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
result += "\n\nTablets:\n";
|
result += "\n\nTablets:\n";
|
||||||
|
|
|
@ -894,7 +894,7 @@ std::string CInputManager::getActiveLayoutForKeyboard(SKeyboard* pKeyboard) {
|
||||||
const auto STATE = WLRKB->xkb_state;
|
const auto STATE = WLRKB->xkb_state;
|
||||||
const auto LAYOUTSNUM = xkb_keymap_num_layouts(KEYMAP);
|
const auto LAYOUTSNUM = xkb_keymap_num_layouts(KEYMAP);
|
||||||
|
|
||||||
for (auto i = 0; i < LAYOUTSNUM; ++i) {
|
for (uint32_t i = 0; i < LAYOUTSNUM; ++i) {
|
||||||
if (xkb_state_layout_index_is_active(STATE, i, XKB_STATE_LAYOUT_EFFECTIVE)) {
|
if (xkb_state_layout_index_is_active(STATE, i, XKB_STATE_LAYOUT_EFFECTIVE)) {
|
||||||
const auto LAYOUTNAME = xkb_keymap_layout_get_name(KEYMAP, i);
|
const auto LAYOUTNAME = xkb_keymap_layout_get_name(KEYMAP, i);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue