From e329bc2c7b3b1ee53648c183fb0e661a80d53479 Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Fri, 14 Apr 2023 15:16:43 +0100 Subject: [PATCH] renderer: fix incorrect shouldRenderWindow calcs --- src/render/Renderer.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/render/Renderer.cpp b/src/render/Renderer.cpp index cae2e04f..7244666d 100644 --- a/src/render/Renderer.cpp +++ b/src/render/Renderer.cpp @@ -71,12 +71,12 @@ bool CHyprRenderer::shouldRenderWindow(CWindow* pWindow, CMonitor* pMonitor, CWo if (pWindow->m_bPinned) return true; - // now check if it has the same workspace - if (pWorkspace && pWorkspace->m_iMonitorID == pMonitor->ID) { - if (pWorkspace->m_vRenderOffset.isBeingAnimated() || pWorkspace->m_fAlpha.isBeingAnimated() || pWorkspace->m_bForceRendering) { + const auto PWINDOWWORKSPACE = g_pCompositor->getWorkspaceByID(pWindow->m_iWorkspaceID); + if (PWINDOWWORKSPACE && PWINDOWWORKSPACE->m_iMonitorID == pMonitor->ID) { + if (PWINDOWWORKSPACE->m_vRenderOffset.isBeingAnimated() || PWINDOWWORKSPACE->m_fAlpha.isBeingAnimated() || PWINDOWWORKSPACE->m_bForceRendering) { return true; } else { - if (!(!pWorkspace->m_bHasFullscreenWindow || pWindow->m_bIsFullscreen || (pWindow->m_bIsFloating && pWindow->m_bCreatedOverFullscreen))) + if (!(!PWINDOWWORKSPACE->m_bHasFullscreenWindow || pWindow->m_bIsFullscreen || (pWindow->m_bIsFloating && pWindow->m_bCreatedOverFullscreen))) return false; } } @@ -1847,4 +1847,4 @@ void CHyprRenderer::initiateManualCrash() { g_pHyprOpenGL->m_tGlobalTimer.reset(); g_pConfigManager->setInt("debug:damage_tracking", 0); -} \ No newline at end of file +}