diff options
| author | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-04-01 23:31:33 +0200 |
|---|---|---|
| committer | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-04-01 23:31:33 +0200 |
| commit | befddca16ddde88ded7a2ed516fa8afcb418e875 (patch) | |
| tree | e1d494b686c201ce1a1844fd9affaa3f6c9b562d /src/managers/InputManager.cpp | |
| parent | 304bf4522ef672604b2ee73f044ba0a56405c88e (diff) | |
Only refocus on pressed
Diffstat (limited to 'src/managers/InputManager.cpp')
| -rw-r--r-- | src/managers/InputManager.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/managers/InputManager.cpp b/src/managers/InputManager.cpp index 10b1ad95..1ab991d3 100644 --- a/src/managers/InputManager.cpp +++ b/src/managers/InputManager.cpp @@ -109,6 +109,8 @@ void CInputManager::onMouseButton(wlr_pointer_button_event* e) { switch (e->state) { case WLR_BUTTON_PRESSED: + refocus(); + if ((e->button == BTN_LEFT || e->button == BTN_RIGHT) && wlr_keyboard_get_modifiers(PKEYBOARD) == (uint32_t)g_pConfigManager->getInt("general:main_mod_internal")) { currentlyDraggedWindow = g_pCompositor->windowFloatingFromCursor(); dragButton = e->button; @@ -124,8 +126,6 @@ void CInputManager::onMouseButton(wlr_pointer_button_event* e) { break; } - refocus(); - // notify app if we didnt handle it if (g_pCompositor->doesSeatAcceptInput(g_pCompositor->m_pLastFocus)) { wlr_seat_pointer_notify_button(g_pCompositor->m_sSeat.seat, e->time_msec, e->button, e->state); |
