diff options
| author | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-08-01 18:42:11 +0200 |
|---|---|---|
| committer | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-08-01 18:42:11 +0200 |
| commit | 338865e4334b5c60ba2657ff6ab7a069b8d7e19d (patch) | |
| tree | 88f80fb977beb4ed74995cd6aceec7413a5a4d33 /src/managers/input/InputManager.cpp | |
| parent | cb36456f4075447aea6e11302c655f2ec787f7b5 (diff) | |
added follow_mouse 3
Diffstat (limited to 'src/managers/input/InputManager.cpp')
| -rw-r--r-- | src/managers/input/InputManager.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/managers/input/InputManager.cpp b/src/managers/input/InputManager.cpp index 58eb5709..8dbff347 100644 --- a/src/managers/input/InputManager.cpp +++ b/src/managers/input/InputManager.cpp @@ -237,7 +237,8 @@ void CInputManager::mouseMoveUnified(uint32_t time, bool refocus) { 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)) { // enter if change floating style - g_pCompositor->focusWindow(pFoundWindow, foundSurface); + if (*PFOLLOWMOUSE != 3) + g_pCompositor->focusWindow(pFoundWindow, foundSurface); wlr_seat_pointer_notify_enter(g_pCompositor->m_sSeat.seat, foundSurface, surfaceLocal.x, surfaceLocal.y); } else if (*PFOLLOWMOUSE == 2) { wlr_seat_pointer_notify_enter(g_pCompositor->m_sSeat.seat, foundSurface, surfaceLocal.x, surfaceLocal.y); @@ -251,9 +252,10 @@ void CInputManager::mouseMoveUnified(uint32_t time, bool refocus) { wlr_seat_pointer_notify_motion(g_pCompositor->m_sSeat.seat, time, surfaceLocal.x, surfaceLocal.y); return; // don't enter any new surfaces } else { - g_pCompositor->focusWindow(pFoundWindow, foundSurface); + if (*PFOLLOWMOUSE != 3) + g_pCompositor->focusWindow(pFoundWindow, foundSurface); } - } else if (pFoundLayerSurface && pFoundLayerSurface->layerSurface->current.keyboard_interactive) + } else if (pFoundLayerSurface && pFoundLayerSurface->layerSurface->current.keyboard_interactive && *PFOLLOWMOUSE != 3) g_pCompositor->focusSurface(foundSurface); wlr_seat_pointer_notify_enter(g_pCompositor->m_sSeat.seat, foundSurface, surfaceLocal.x, surfaceLocal.y); |
