mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-02 17:26:00 +01:00
keybinds: fixup release conditions
honestly I already forgot why the m_vHeldBack vec existed. Seems useless and annoying. Fixes #3113
This commit is contained in:
parent
b10cae3010
commit
9c4f776757
2 changed files with 1 additions and 11 deletions
|
@ -387,13 +387,6 @@ bool CKeybindManager::handleKeybinds(const uint32_t& modmask, const std::string&
|
||||||
if (g_pCompositor->m_sSeat.exclusiveClient)
|
if (g_pCompositor->m_sSeat.exclusiveClient)
|
||||||
Debug::log(LOG, "Keybind handling only locked (inhibitor)");
|
Debug::log(LOG, "Keybind handling only locked (inhibitor)");
|
||||||
|
|
||||||
if (pressed && !m_vHeldBack.empty()) {
|
|
||||||
// release the held back events
|
|
||||||
for (auto& k : m_vHeldBack)
|
|
||||||
wlr_seat_keyboard_notify_key(g_pCompositor->m_sSeat.seat, time, k, WL_KEYBOARD_KEY_STATE_PRESSED);
|
|
||||||
m_vHeldBack.clear();
|
|
||||||
}
|
|
||||||
|
|
||||||
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 ||
|
||||||
(!pressed && !k.release && k.handler != "pass" && k.handler != "mouse" && k.handler != "global") || k.shadowed)
|
(!pressed && !k.release && k.handler != "pass" && k.handler != "mouse" && k.handler != "global") || k.shadowed)
|
||||||
|
@ -427,8 +420,7 @@ bool CKeybindManager::handleKeybinds(const uint32_t& modmask, const std::string&
|
||||||
if (k.transparent)
|
if (k.transparent)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
// suppress down event
|
continue;
|
||||||
m_vHeldBack.push_back(keysym);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const auto DISPATCHER = m_mDispatchers.find(k.mouse ? "mouse" : k.handler);
|
const auto DISPATCHER = m_mDispatchers.find(k.mouse ? "mouse" : k.handler);
|
||||||
|
|
|
@ -68,8 +68,6 @@ class CKeybindManager {
|
||||||
|
|
||||||
inline static std::string m_szCurrentSelectedSubmap = "";
|
inline static std::string m_szCurrentSelectedSubmap = "";
|
||||||
|
|
||||||
std::vector<xkb_keysym_t> m_vHeldBack;
|
|
||||||
|
|
||||||
SKeybind* m_pActiveKeybind = nullptr;
|
SKeybind* m_pActiveKeybind = nullptr;
|
||||||
|
|
||||||
uint32_t m_uTimeLastMs = 0;
|
uint32_t m_uTimeLastMs = 0;
|
||||||
|
|
Loading…
Reference in a new issue