diff options
| author | Marco Siedentopf <siedentm@me.com> | 2022-06-12 15:04:02 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-06-12 15:04:02 +0000 |
| commit | 85d2c1d5a65e28dc06cd96735bd46be4480d19c1 (patch) | |
| tree | 13566017b33a972c9df5aa6df0150f1b3d0bf134 /src/managers/input/InputManager.cpp | |
| parent | 16d1b44ef999a009d4a82acea0cb7943c88e2870 (diff) | |
| parent | 2208be51752fcc7a63288dca0cbac3454f322534 (diff) | |
Merge branch 'vaxerski:main' into main
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 5f49fb1c..5aa55201 100644 --- a/src/managers/input/InputManager.cpp +++ b/src/managers/input/InputManager.cpp @@ -167,12 +167,16 @@ void CInputManager::mouseMoveUnified(uint32_t time, bool refocus) { Vector2D surfaceLocal = surfacePos == Vector2D(-1337, -1337) ? surfaceCoords : mouseCoords - surfacePos; if (pFoundWindow) { - if (g_pConfigManager->getInt("input:follow_mouse") == 0 && !refocus) { + static auto *const PFOLLOWMOUSE = &g_pConfigManager->getConfigValuePtr("input:follow_mouse")->intValue; + 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); 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); + } wlr_seat_pointer_notify_motion(g_pCompositor->m_sSeat.seat, time, surfaceLocal.x, surfaceLocal.y); return; // don't enter any new surfaces } else { |
