mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-15 05:05:59 +01:00
only add timer once
modified: src/managers/KeybindManager.cpp
This commit is contained in:
parent
bbf17b515a
commit
5533e1946b
1 changed files with 5 additions and 3 deletions
|
@ -735,11 +735,13 @@ SDispatchResult CKeybindManager::handleKeybinds(const uint32_t modmask, const SP
|
||||||
|
|
||||||
if (k.repeat) {
|
if (k.repeat) {
|
||||||
m_pActiveKeybinds.push_back(&k);
|
m_pActiveKeybinds.push_back(&k);
|
||||||
m_pActiveKeybindEventSource = wl_event_loop_add_timer(g_pCompositor->m_sWLEventLoop, repeatKeyHandler, &m_pActiveKeybinds);
|
if (!m_pActiveKeybindEventSource) {
|
||||||
|
m_pActiveKeybindEventSource = wl_event_loop_add_timer(g_pCompositor->m_sWLEventLoop, repeatKeyHandler, &m_pActiveKeybinds);
|
||||||
|
|
||||||
const auto PACTIVEKEEB = g_pSeatManager->keyboard.lock();
|
const auto PACTIVEKEEB = g_pSeatManager->keyboard.lock();
|
||||||
|
|
||||||
wl_event_source_timer_update(m_pActiveKeybindEventSource, PACTIVEKEEB->repeatDelay);
|
wl_event_source_timer_update(m_pActiveKeybindEventSource, PACTIVEKEEB->repeatDelay);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!k.nonConsuming)
|
if (!k.nonConsuming)
|
||||||
|
|
Loading…
Reference in a new issue