summaryrefslogtreecommitdiff
path: root/src/managers/KeybindManager.cpp
diff options
context:
space:
mode:
authorvaxerski <43317083+vaxerski@users.noreply.github.com>2023-09-10 16:54:14 +0100
committervaxerski <43317083+vaxerski@users.noreply.github.com>2023-09-10 16:54:14 +0100
commitd28725c67844c55393b3f78bfccfe065e5a25373 (patch)
tree35403eab4f16d9c350bf84ce7561a07d3b3ea018 /src/managers/KeybindManager.cpp
parentdcb909df0466a8b9fe07ea7c420b840e2e910223 (diff)
keybinds: ignore conditions on special release
while the previous commit ignores mods, we also need to ignore other conditions to avoid dangling presses
Diffstat (limited to 'src/managers/KeybindManager.cpp')
-rw-r--r--src/managers/KeybindManager.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/managers/KeybindManager.cpp b/src/managers/KeybindManager.cpp
index 98439695..8988b9c9 100644
--- a/src/managers/KeybindManager.cpp
+++ b/src/managers/KeybindManager.cpp
@@ -430,9 +430,10 @@ bool CKeybindManager::handleKeybinds(const uint32_t& modmask, const std::string&
const bool SPECIALDISPATCHER = k.handler == "global" || k.handler == "pass" || k.handler == "mouse";
const bool SPECIALTRIGGERED =
std::find_if(m_vPressedSpecialBinds.begin(), m_vPressedSpecialBinds.end(), [&](const auto& other) { return other == &k; }) != m_vPressedSpecialBinds.end();
- const bool IGNOREMODS = SPECIALDISPATCHER && !pressed && SPECIALTRIGGERED; // ignore mods. Pass, global dispatchers should be released immediately once the key is released.
+ const bool IGNORECONDITIONS =
+ SPECIALDISPATCHER && !pressed && SPECIALTRIGGERED; // ignore mods. Pass, global dispatchers should be released immediately once the key is released.
- if ((modmask != k.modmask && !IGNOREMODS) || (g_pCompositor->m_sSeat.exclusiveClient && !k.locked) || k.submap != m_szCurrentSelectedSubmap || k.shadowed)
+ if (!IGNORECONDITIONS && (modmask != k.modmask || (g_pCompositor->m_sSeat.exclusiveClient && !k.locked) || k.submap != m_szCurrentSelectedSubmap || k.shadowed))
continue;
if (!key.empty()) {