diff options
| author | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-08-22 18:22:26 +0200 |
|---|---|---|
| committer | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-08-22 18:22:26 +0200 |
| commit | 575bfa40e5db57944e7d38e8561c17270ef9a635 (patch) | |
| tree | ea868682cb7409686001510ed4227dd7be5ce405 /src/managers/input/InputManager.cpp | |
| parent | 429b2bffeda0211e90b31b039a7d89cfe25ad6e6 (diff) | |
added misc:float_switch_override_focus
Diffstat (limited to 'src/managers/input/InputManager.cpp')
| -rw-r--r-- | src/managers/input/InputManager.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/managers/input/InputManager.cpp b/src/managers/input/InputManager.cpp index 43a1b5a5..81e16550 100644 --- a/src/managers/input/InputManager.cpp +++ b/src/managers/input/InputManager.cpp @@ -32,6 +32,7 @@ void CInputManager::mouseMoveUnified(uint32_t time, bool refocus) { static auto *const PMOUSEDPMS = &g_pConfigManager->getConfigValuePtr("misc:mouse_move_enables_dpms")->intValue; static auto *const PFOLLOWONDND = &g_pConfigManager->getConfigValuePtr("misc:always_follow_on_dnd")->intValue; static auto *const PHOGFOCUS = &g_pConfigManager->getConfigValuePtr("misc:layers_hog_keyboard_focus")->intValue; + static auto *const PFLOATBEHAVIOR = &g_pConfigManager->getConfigValuePtr("input:float_switch_override_focus")->intValue; if (!g_pCompositor->m_bReadyToProcess) return; @@ -248,7 +249,7 @@ void CInputManager::mouseMoveUnified(uint32_t time, bool refocus) { if (pFoundWindow) { if (*PFOLLOWMOUSE != 1 && !refocus) { - if (pFoundWindow != g_pCompositor->m_pLastWindow && g_pCompositor->windowValidMapped(g_pCompositor->m_pLastWindow) && (g_pCompositor->m_pLastWindow->m_bIsFloating != pFoundWindow->m_bIsFloating)) { + if (pFoundWindow != g_pCompositor->m_pLastWindow && g_pCompositor->windowValidMapped(g_pCompositor->m_pLastWindow) && g_pCompositor->m_pLastWindow->m_bIsFloating != pFoundWindow->m_bIsFloating && *PFLOATBEHAVIOR) { // enter if change floating style if (*PFOLLOWMOUSE != 3 && allowKeyboardRefocus) g_pCompositor->focusWindow(pFoundWindow, foundSurface); |
