From 6dc8c4b31048d225e20008553a3998b543399c49 Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Sun, 24 Jul 2022 14:35:58 +0200 Subject: [PATCH] Shadowing Keybinds fixes --- src/managers/KeybindManager.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/managers/KeybindManager.cpp b/src/managers/KeybindManager.cpp index 893313f4..62a4ed3b 100644 --- a/src/managers/KeybindManager.cpp +++ b/src/managers/KeybindManager.cpp @@ -98,6 +98,9 @@ bool CKeybindManager::onKeyEvent(wlr_keyboard_key_event* e, SKeyboard* pKeyboard found = g_pKeybindManager->handleKeybinds(MODS, "", keysym, 0, true, e->time_msec) || found; found = g_pKeybindManager->handleKeybinds(MODS, "", 0, KEYCODE, true, e->time_msec) || found; + + if (found) + shadowKeybinds(); } else if (e->state == WL_KEYBOARD_KEY_STATE_RELEASED) { m_dPressedKeycodes.erase(std::remove(m_dPressedKeycodes.begin(), m_dPressedKeycodes.end(), KEYCODE)); @@ -184,8 +187,6 @@ bool CKeybindManager::handleKeybinds(const uint32_t& modmask, const std::string& DISPATCHER->second(k.arg); } - shadowKeybinds(keysym == 0 ? 0 : keysym, keycode == -1 ? -1 : keycode); - found = true; }