summaryrefslogtreecommitdiff
path: root/src/managers/InputManager.cpp
diff options
context:
space:
mode:
authorvaxerski <43317083+vaxerski@users.noreply.github.com>2022-03-19 22:03:40 +0100
committervaxerski <43317083+vaxerski@users.noreply.github.com>2022-03-19 22:03:40 +0100
commit221acebf2cff1125d3183d5bb0ace17a8f4da9de (patch)
treee17a5c46dbe3bb6bca3df2825dc311767ddc71fc /src/managers/InputManager.cpp
parent2e5435fe91d5e8273791737717a4c43675c51da9 (diff)
input tweaks
Diffstat (limited to 'src/managers/InputManager.cpp')
-rw-r--r--src/managers/InputManager.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/managers/InputManager.cpp b/src/managers/InputManager.cpp
index 64e9bca9..ecf63bf2 100644
--- a/src/managers/InputManager.cpp
+++ b/src/managers/InputManager.cpp
@@ -131,17 +131,18 @@ void CInputManager::onKeyboardKey(wlr_event_keyboard_key* e, SKeyboard* pKeyboar
wlr_idle_notify_activity(g_pCompositor->m_sWLRIdle, g_pCompositor->m_sWLRSeat);
+ bool found = false;
if (e->state == WL_KEYBOARD_KEY_STATE_PRESSED) {
for (int i = 0; i < syms; ++i)
- g_pKeybindManager->handleKeybinds(MODS, keysyms[i]);
+ found = g_pKeybindManager->handleKeybinds(MODS, keysyms[i]) || found;
} else if (e->state == WL_KEYBOARD_KEY_STATE_RELEASED) {
// hee hee
}
- wlr_seat_set_keyboard(g_pCompositor->m_sWLRSeat, pKeyboard->keyboard);
- wlr_seat_keyboard_notify_key(g_pCompositor->m_sWLRSeat, e->time_msec, e->keycode, e->state);
-
- g_pCompositor->focusWindow(g_pCompositor->vectorToWindowIdeal(g_pInputManager->getMouseCoordsInternal()));
+ if (!found) {
+ wlr_seat_set_keyboard(g_pCompositor->m_sWLRSeat, pKeyboard->keyboard);
+ wlr_seat_keyboard_notify_key(g_pCompositor->m_sWLRSeat, e->time_msec, e->keycode, e->state);
+ }
}
void CInputManager::onKeyboardMod(void* data, SKeyboard* pKeyboard) {