mirror of
https://github.com/hyprwm/Hyprland
synced 2024-12-23 03:49:51 +01:00
keybinds: avoid sending release on suppressed press
This commit is contained in:
parent
f3909cf2bf
commit
a1b1480c21
1 changed files with 7 additions and 3 deletions
|
@ -352,8 +352,7 @@ bool CKeybindManager::handleKeybinds(const uint32_t& modmask, const std::string&
|
||||||
}
|
}
|
||||||
|
|
||||||
for (auto& k : m_lKeybinds) {
|
for (auto& k : m_lKeybinds) {
|
||||||
if (modmask != k.modmask || (g_pCompositor->m_sSeat.exclusiveClient && !k.locked) || k.submap != m_szCurrentSelectedSubmap ||
|
if (modmask != k.modmask || (g_pCompositor->m_sSeat.exclusiveClient && !k.locked) || k.submap != m_szCurrentSelectedSubmap || k.shadowed)
|
||||||
(!pressed && !k.release && k.handler != "pass" && k.handler != "mouse" && k.handler != "global") || k.shadowed)
|
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (!key.empty()) {
|
if (!key.empty()) {
|
||||||
|
@ -382,6 +381,11 @@ bool CKeybindManager::handleKeybinds(const uint32_t& modmask, const std::string&
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!pressed && !k.release && k.handler != "pass" && k.handler != "mouse" && k.handler != "global") {
|
||||||
|
found = true; // avoid sending a release event
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
const auto DISPATCHER = m_mDispatchers.find(k.mouse ? "mouse" : k.handler);
|
const auto DISPATCHER = m_mDispatchers.find(k.mouse ? "mouse" : k.handler);
|
||||||
|
|
||||||
// Should never happen, as we check in the ConfigManager, but oh well
|
// Should never happen, as we check in the ConfigManager, but oh well
|
||||||
|
|
Loading…
Reference in a new issue