diff options
author | Vaxry <[email protected]> | 2024-04-23 21:15:37 +0100 |
---|---|---|
committer | Vaxry <[email protected]> | 2024-04-23 21:15:37 +0100 |
commit | d119513749daf47b9061258a1974b34111ab8bb5 (patch) | |
tree | 32eb9c79d7ba031e3f15b0eb5690a7fdc1812594 | |
parent | bb4646bbdf7d3490c2442347d852a62470aec2aa (diff) | |
download | Hyprland-d119513749daf47b9061258a1974b34111ab8bb5.tar.gz Hyprland-d119513749daf47b9061258a1974b34111ab8bb5.zip |
renderer: fix safety around sendFrameEventsToWorkspace
ref #5718
-rw-r--r-- | src/render/Renderer.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/render/Renderer.cpp b/src/render/Renderer.cpp index 8b6be201..4b1e7ace 100644 --- a/src/render/Renderer.cpp +++ b/src/render/Renderer.cpp @@ -1425,7 +1425,7 @@ void CHyprRenderer::renderWorkspace(CMonitor* pMonitor, PHLWORKSPACE pWorkspace, void CHyprRenderer::sendFrameEventsToWorkspace(CMonitor* pMonitor, PHLWORKSPACE pWorkspace, timespec* now) { for (auto& w : g_pCompositor->m_vWindows) { - if (w->isHidden() && !w->m_bIsMapped && !w->m_bFadingOut) + if (w->isHidden() || !w->m_bIsMapped || w->m_bFadingOut || !w->m_pWLSurface.wlr()) continue; if (!shouldRenderWindow(w.get(), pMonitor)) @@ -1437,6 +1437,9 @@ void CHyprRenderer::sendFrameEventsToWorkspace(CMonitor* pMonitor, PHLWORKSPACE for (auto& lsl : pMonitor->m_aLayerSurfaceLayers) { for (auto& ls : lsl) { + if (ls->fadingOut || !ls->surface.wlr()) + continue; + wlr_surface_for_each_surface( ls->surface.wlr(), [](wlr_surface* s, int x, int y, void* data) { wlr_surface_send_frame_done(s, (timespec*)data); }, now); } |