mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-02 19:25:58 +01:00
renderer: send frame events to apps on empty damage renders
fixes #5711
This commit is contained in:
parent
cf3596a96d
commit
a2366f78f0
2 changed files with 26 additions and 2 deletions
|
@ -1322,9 +1322,12 @@ void CHyprRenderer::renderMonitor(CMonitor* pMonitor) {
|
||||||
damageBlinkCleanup = 0;
|
damageBlinkCleanup = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else
|
||||||
g_pHyprRenderer->renderWindow(pMonitor->solitaryClient, pMonitor, &now, false, RENDER_PASS_MAIN /* solitary = no popups */);
|
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();
|
renderCursor = renderCursor && shouldRenderCursor();
|
||||||
|
@ -1420,6 +1423,26 @@ void CHyprRenderer::renderWorkspace(CMonitor* pMonitor, PHLWORKSPACE pWorkspace,
|
||||||
g_pHyprOpenGL->m_RenderData.pWorkspace = nullptr;
|
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) {
|
void CHyprRenderer::setWindowScanoutMode(CWindow* pWindow) {
|
||||||
if (!g_pCompositor->m_sWLRLinuxDMABuf || g_pSessionLockManager->isSessionLocked())
|
if (!g_pCompositor->m_sWLRLinuxDMABuf || g_pSessionLockManager->isSessionLocked())
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -117,6 +117,7 @@ class CHyprRenderer {
|
||||||
void renderDragIcon(CMonitor*, timespec*);
|
void renderDragIcon(CMonitor*, timespec*);
|
||||||
void renderIMEPopup(CInputPopup*, CMonitor*, timespec*);
|
void renderIMEPopup(CInputPopup*, CMonitor*, timespec*);
|
||||||
void renderWorkspace(CMonitor* pMonitor, PHLWORKSPACE pWorkspace, timespec* now, const CBox& geometry);
|
void renderWorkspace(CMonitor* pMonitor, PHLWORKSPACE pWorkspace, timespec* now, const CBox& geometry);
|
||||||
|
void sendFrameEventsToWorkspace(CMonitor* pMonitor, PHLWORKSPACE pWorkspace, timespec* now); // sends frame displayed events but doesn't actually render anything
|
||||||
void renderAllClientsForWorkspace(CMonitor* pMonitor, PHLWORKSPACE pWorkspace, timespec* now, const Vector2D& translate = {0, 0}, const float& scale = 1.f);
|
void renderAllClientsForWorkspace(CMonitor* pMonitor, PHLWORKSPACE pWorkspace, timespec* now, const Vector2D& translate = {0, 0}, const float& scale = 1.f);
|
||||||
|
|
||||||
bool m_bCursorHidden = false;
|
bool m_bCursorHidden = false;
|
||||||
|
|
Loading…
Reference in a new issue