aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/render/Renderer.cpp
diff options
context:
space:
mode:
authorVaxry <[email protected]>2024-04-23 16:08:54 +0100
committerVaxry <[email protected]>2024-04-23 16:08:54 +0100
commita2366f78f0ddfc241811b48dfdb1289b81de0e1e (patch)
treea072802adef63cbf41d5bd03190ce48c7f04e246 /src/render/Renderer.cpp
parentcf3596a96d5c1012c363d8243baca6431ecf835b (diff)
downloadHyprland-a2366f78f0ddfc241811b48dfdb1289b81de0e1e.tar.gz
Hyprland-a2366f78f0ddfc241811b48dfdb1289b81de0e1e.zip
renderer: send frame events to apps on empty damage renders
fixes #5711
Diffstat (limited to 'src/render/Renderer.cpp')
-rw-r--r--src/render/Renderer.cpp27
1 files changed, 25 insertions, 2 deletions
diff --git a/src/render/Renderer.cpp b/src/render/Renderer.cpp
index 9bb75210..8b6be201 100644
--- a/src/render/Renderer.cpp
+++ b/src/render/Renderer.cpp
@@ -1322,9 +1322,12 @@ void CHyprRenderer::renderMonitor(CMonitor* pMonitor) {
damageBlinkCleanup = 0;
}
}
- } else {
+ } else
g_pHyprRenderer->renderWindow(pMonitor->solitaryClient, pMonitor, &now, false, RENDER_PASS_MAIN /* solitary = no popups */);
- }
+ } else {
+ sendFrameEventsToWorkspace(pMonitor, pMonitor->activeWorkspace, &now);
+ if (pMonitor->activeSpecialWorkspace)
+ sendFrameEventsToWorkspace(pMonitor, pMonitor->activeSpecialWorkspace, &now);
}
renderCursor = renderCursor && shouldRenderCursor();
@@ -1420,6 +1423,26 @@ void CHyprRenderer::renderWorkspace(CMonitor* pMonitor, PHLWORKSPACE pWorkspace,
g_pHyprOpenGL->m_RenderData.pWorkspace = nullptr;
}
+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)
+ continue;
+
+ if (!shouldRenderWindow(w.get(), pMonitor))
+ continue;
+
+ wlr_surface_for_each_surface(
+ w->m_pWLSurface.wlr(), [](wlr_surface* s, int x, int y, void* data) { wlr_surface_send_frame_done(s, (timespec*)data); }, now);
+ }
+
+ for (auto& lsl : pMonitor->m_aLayerSurfaceLayers) {
+ for (auto& ls : lsl) {
+ 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);
+ }
+ }
+}
+
void CHyprRenderer::setWindowScanoutMode(CWindow* pWindow) {
if (!g_pCompositor->m_sWLRLinuxDMABuf || g_pSessionLockManager->isSessionLocked())
return;