diff options
| author | Vaxry <vaxry@vaxry.net> | 2024-03-05 20:46:08 +0000 |
|---|---|---|
| committer | Vaxry <vaxry@vaxry.net> | 2024-03-05 20:46:08 +0000 |
| commit | 05dd204c5feddd18084a4ae5e4747579b0728a23 (patch) | |
| tree | 250ec6800d89b917847e5d1ccb40b47dcebbc737 /src/Window.cpp | |
| parent | 31e1287da26c7389d1c65f05fe40e647a3ad2689 (diff) | |
window: ignore surface updates in unsafe / on invalid monitors
Diffstat (limited to 'src/Window.cpp')
| -rw-r--r-- | src/Window.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Window.cpp b/src/Window.cpp index 6444aced..41562291 100644 --- a/src/Window.cpp +++ b/src/Window.cpp @@ -336,7 +336,7 @@ void sendLeaveIter(wlr_surface* pSurface, int x, int y, void* data) { } void CWindow::updateSurfaceScaleTransformDetails() { - if (!m_bIsMapped || m_bHidden) + if (!m_bIsMapped || m_bHidden || g_pCompositor->m_bUnsafeState) return; const auto PLASTMONITOR = g_pCompositor->getMonitorFromID(m_iLastSurfaceMonitorID); @@ -345,6 +345,9 @@ void CWindow::updateSurfaceScaleTransformDetails() { const auto PNEWMONITOR = g_pCompositor->getMonitorFromID(m_iMonitorID); + if (!PNEWMONITOR) + return; + if (PNEWMONITOR != PLASTMONITOR) { if (PLASTMONITOR && PLASTMONITOR->m_bEnabled) wlr_surface_for_each_surface(m_pWLSurface.wlr(), sendLeaveIter, PLASTMONITOR->output); |
