diff options
| author | vaxerski <vaxry@vaxry.net> | 2022-08-16 16:15:43 +0200 |
|---|---|---|
| committer | vaxerski <vaxry@vaxry.net> | 2022-08-16 16:15:43 +0200 |
| commit | ea45c6bfe0388b7d49548538473ee80ab852cce7 (patch) | |
| tree | cdee1fc8a94a6cfa2fa75d2966105c325d3f333e /src | |
| parent | 6e2467cc24f8afb70a4aaad3841a7c41fbc568b5 (diff) | |
fix memory issue with hyprctl devices
Diffstat (limited to 'src')
| -rw-r--r-- | src/debug/HyprCtl.cpp | 2 | ||||
| -rw-r--r-- | src/managers/input/InputManager.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/debug/HyprCtl.cpp b/src/debug/HyprCtl.cpp index bee5ce79..7b36a6ce 100644 --- a/src/debug/HyprCtl.cpp +++ b/src/debug/HyprCtl.cpp @@ -386,7 +386,7 @@ R"#( { for (auto& k : g_pInputManager->m_lKeyboards) { 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"; diff --git a/src/managers/input/InputManager.cpp b/src/managers/input/InputManager.cpp index c552910c..95b30587 100644 --- a/src/managers/input/InputManager.cpp +++ b/src/managers/input/InputManager.cpp @@ -894,7 +894,7 @@ std::string CInputManager::getActiveLayoutForKeyboard(SKeyboard* pKeyboard) { const auto STATE = WLRKB->xkb_state; 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)) { const auto LAYOUTNAME = xkb_keymap_layout_get_name(KEYMAP, i); |
