diff options
| author | vaxerski <vaxry@vaxry.net> | 2024-01-09 18:14:08 +0100 |
|---|---|---|
| committer | vaxerski <vaxry@vaxry.net> | 2024-01-09 18:14:08 +0100 |
| commit | 71166ef40b5f7640fcddb1951d84f0f086e198d2 (patch) | |
| tree | 310c5d87f84676ee91ae01a893b73e210b11a6c5 /src/Window.cpp | |
| parent | 252aaaecfa3b57eb07822177a8bf3b609aff7115 (diff) | |
subsurfaceTree: update surface tree protocol feedback on map
Diffstat (limited to 'src/Window.cpp')
| -rw-r--r-- | src/Window.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/Window.cpp b/src/Window.cpp index 01b58253..73835ccd 100644 --- a/src/Window.cpp +++ b/src/Window.cpp @@ -318,7 +318,7 @@ void CWindow::destroyToplevelHandle() { } void CWindow::updateToplevel() { - updateSurfaceOutputs(); + updateSurfaceScaleTransformDetails(); if (!m_phForeignToplevel) return; @@ -345,8 +345,8 @@ void sendLeaveIter(wlr_surface* pSurface, int x, int y, void* data) { wlr_surface_send_leave(pSurface, OUTPUT); } -void CWindow::updateSurfaceOutputs() { - if (m_iLastSurfaceMonitorID == m_iMonitorID || !m_bIsMapped || m_bHidden) +void CWindow::updateSurfaceScaleTransformDetails() { + if (!m_bIsMapped || m_bHidden) return; const auto PLASTMONITOR = g_pCompositor->getMonitorFromID(m_iLastSurfaceMonitorID); @@ -355,10 +355,12 @@ void CWindow::updateSurfaceOutputs() { const auto PNEWMONITOR = g_pCompositor->getMonitorFromID(m_iMonitorID); - if (PLASTMONITOR && PLASTMONITOR->m_bEnabled) - wlr_surface_for_each_surface(m_pWLSurface.wlr(), sendLeaveIter, PLASTMONITOR->output); + if (PNEWMONITOR != PLASTMONITOR) { + if (PLASTMONITOR && PLASTMONITOR->m_bEnabled) + wlr_surface_for_each_surface(m_pWLSurface.wlr(), sendLeaveIter, PLASTMONITOR->output); - wlr_surface_for_each_surface(m_pWLSurface.wlr(), sendEnterIter, PNEWMONITOR->output); + wlr_surface_for_each_surface(m_pWLSurface.wlr(), sendEnterIter, PNEWMONITOR->output); + } wlr_surface_for_each_surface( m_pWLSurface.wlr(), |
