diff options
| author | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-11-08 20:28:41 +0000 |
|---|---|---|
| committer | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-11-08 20:28:41 +0000 |
| commit | 1cf829c889ea50476ac0b45d9031e6c1a7da0f55 (patch) | |
| tree | da62fc80e36b64965208369fc40cb8b34657ac35 /src/managers/input/InputManager.cpp | |
| parent | 17992b633ddacae06dea9743e1464cb990ee596f (diff) | |
minor loose focus fixes
Diffstat (limited to 'src/managers/input/InputManager.cpp')
| -rw-r--r-- | src/managers/input/InputManager.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/managers/input/InputManager.cpp b/src/managers/input/InputManager.cpp index 6d475375..adca5b14 100644 --- a/src/managers/input/InputManager.cpp +++ b/src/managers/input/InputManager.cpp @@ -294,7 +294,7 @@ void CInputManager::mouseMoveUnified(uint32_t time, bool refocus) { m_bLastFocusOnLS = false; return; // don't enter any new surfaces } else { - if ((*PFOLLOWMOUSE != 3 && allowKeyboardRefocus) || (refocus && *PFOLLOWMOUSE != 3)) + if ((*PFOLLOWMOUSE != 3 && allowKeyboardRefocus) || refocus) g_pCompositor->focusWindow(pFoundWindow, foundSurface); } @@ -387,12 +387,16 @@ void CInputManager::processMouseDownNormal(wlr_pointer_button_event* e) { // notify the keybind manager static auto *const PPASSMOUSE = &g_pConfigManager->getConfigValuePtr("binds:pass_mouse_when_bound")->intValue; const auto PASS = g_pKeybindManager->onMouseEvent(e); + static auto *const PFOLLOWMOUSE = &g_pConfigManager->getConfigValuePtr("input:follow_mouse")->intValue; if (!PASS && !*PPASSMOUSE) return; switch (e->state) { case WLR_BUTTON_PRESSED: + if (*PFOLLOWMOUSE == 3) // don't refocus on full loose + break; + if (!g_pCompositor->m_sSeat.mouse->currentConstraint) refocus(); |
