diff options
| author | Vaxry <vaxry@vaxry.net> | 2023-12-12 14:58:43 +0000 |
|---|---|---|
| committer | Vaxry <vaxry@vaxry.net> | 2023-12-12 14:58:43 +0000 |
| commit | ba2af6f86d26fbf4b51aa37bf901e0118f46bbe3 (patch) | |
| tree | 2c4b6da1b4cbd2ccc9f8ec4e55d81ef8829a2aef /src/events/Windows.cpp | |
| parent | 1950c3fc9c807f10735b0a681aca49fd2d0d2d0b (diff) | |
focus: prefer sendMotionEventsToFocused for ensuring cursor image
Diffstat (limited to 'src/events/Windows.cpp')
| -rw-r--r-- | src/events/Windows.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/events/Windows.cpp b/src/events/Windows.cpp index 2c107999..efefcbec 100644 --- a/src/events/Windows.cpp +++ b/src/events/Windows.cpp @@ -641,8 +641,7 @@ void Events::listener_mapWindow(void* owner, void* data) { g_pCompositor->setPreferredScaleForSurface(PWINDOW->m_pWLSurface.wlr(), PMONITOR->scale); g_pCompositor->setPreferredTransformForSurface(PWINDOW->m_pWLSurface.wlr(), PMONITOR->transform); - if (g_pCompositor->vectorToWindowIdeal(g_pInputManager->getMouseCoordsInternal()) == g_pCompositor->m_pLastWindow) - g_pInputManager->simulateMouseMovement(); + g_pInputManager->sendMotionEventsToFocused(); // fix some xwayland apps that don't behave nicely PWINDOW->m_vReportedSize = PWINDOW->m_vPendingReportedSize; @@ -737,8 +736,7 @@ void Events::listener_unmapWindow(void* owner, void* data) { if (PWINDOWCANDIDATE != g_pCompositor->m_pLastWindow && PWINDOWCANDIDATE) g_pCompositor->focusWindow(PWINDOWCANDIDATE); - if (g_pCompositor->vectorToWindowIdeal(g_pInputManager->getMouseCoordsInternal()) == PWINDOWCANDIDATE) - g_pInputManager->simulateMouseMovement(); + g_pInputManager->sendMotionEventsToFocused(); // CWindow::onUnmap will remove this window's active status, but we can't really do it above. if (PWINDOW == g_pCompositor->m_pLastWindow || !g_pCompositor->m_pLastWindow) { |
