mirror of https://github.com/hyprwm/Hyprland
renderer: send frame events to apps on empty damage renders
fixes #5711
This commit is contained in:
parent
cf3596a96d
commit
a2366f78f0
|
@ -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;
|
||||
|
|
|
@ -117,6 +117,7 @@ class CHyprRenderer {
|
|||
void renderDragIcon(CMonitor*, timespec*);
|
||||
void renderIMEPopup(CInputPopup*, CMonitor*, timespec*);
|
||||
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);
|
||||
|
||||
bool m_bCursorHidden = false;
|
||||
|
|
Loading…
Reference in New Issue