renderer: improve fullscreen workspace client rendering

fixes #4076
This commit is contained in:
Vaxry 2023-12-09 18:38:32 +00:00
parent 89d8f665b5
commit 0ebbf371ff

View file

@ -168,7 +168,8 @@ bool CHyprRenderer::shouldRenderWindow(CWindow* pWindow, CMonitor* pMonitor, CWo
if (PWINDOWWORKSPACE->m_vRenderOffset.isBeingAnimated() || PWINDOWWORKSPACE->m_fAlpha.isBeingAnimated() || PWINDOWWORKSPACE->m_bForceRendering) { if (PWINDOWWORKSPACE->m_vRenderOffset.isBeingAnimated() || PWINDOWWORKSPACE->m_fAlpha.isBeingAnimated() || PWINDOWWORKSPACE->m_bForceRendering) {
return true; return true;
} else { } else {
if (!(!PWINDOWWORKSPACE->m_bHasFullscreenWindow || pWindow->m_bIsFullscreen || (pWindow->m_bIsFloating && pWindow->m_bCreatedOverFullscreen))) if (PWINDOWWORKSPACE->m_bHasFullscreenWindow && !pWindow->m_bIsFullscreen && !pWindow->m_bIsFloating && !pWindow->m_bCreatedOverFullscreen &&
pWindow->m_fAlpha.fl() == 0)
return false; return false;
} }
} }
@ -220,7 +221,7 @@ void CHyprRenderer::renderWorkspaceWindowsFullscreen(CMonitor* pMonitor, CWorksp
// loop over the tiled windows that are fading out // loop over the tiled windows that are fading out
for (auto& w : g_pCompositor->m_vWindows) { for (auto& w : g_pCompositor->m_vWindows) {
if (w->m_iWorkspaceID != pMonitor->activeWorkspace) if (!shouldRenderWindow(w.get(), pMonitor, pWorkspace))
continue; continue;
if (w->m_fAlpha.fl() == 0.f) if (w->m_fAlpha.fl() == 0.f)
@ -237,7 +238,7 @@ void CHyprRenderer::renderWorkspaceWindowsFullscreen(CMonitor* pMonitor, CWorksp
// and floating ones too // and floating ones too
for (auto& w : g_pCompositor->m_vWindows) { for (auto& w : g_pCompositor->m_vWindows) {
if (w->m_iWorkspaceID != pMonitor->activeWorkspace) if (!shouldRenderWindow(w.get(), pMonitor, pWorkspace))
continue; continue;
if (w->m_fAlpha.fl() == 0.f) if (w->m_fAlpha.fl() == 0.f)