diff --git a/src/render/Renderer.cpp b/src/render/Renderer.cpp index bb31d307..09f9bd28 100644 --- a/src/render/Renderer.cpp +++ b/src/render/Renderer.cpp @@ -76,10 +76,16 @@ bool CHyprRenderer::shouldRenderWindow(CWindow* pWindow, CMonitor* pMonitor) { return false; // now check if it has the same workspace + const auto PWORKSPACE = g_pCompositor->getWorkspaceByID(pWindow->m_iWorkspaceID); + + if (PWORKSPACE->m_iMonitorID == pMonitor->ID) { + if (!(!PWORKSPACE->m_bHasFullscreenWindow || pWindow->m_bIsFullscreen || (pWindow->m_bIsFloating && pWindow->m_bCreatedOverFullscreen))) + return false; + } + if (pWindow->m_iWorkspaceID == pMonitor->activeWorkspace) return true; - const auto PWORKSPACE = g_pCompositor->getWorkspaceByID(pWindow->m_iWorkspaceID); // if not, check if it maybe is active on a different monitor. vvv might be animation in progress if (g_pCompositor->isWorkspaceVisible(pWindow->m_iWorkspaceID) || (PWORKSPACE && PWORKSPACE->m_iMonitorID == pMonitor->ID && PWORKSPACE->m_bForceRendering) || (PWORKSPACE && PWORKSPACE->m_iMonitorID == pMonitor->ID && (PWORKSPACE->m_vRenderOffset.isBeingAnimated() || PWORKSPACE->m_fAlpha.isBeingAnimated()))) return true; @@ -122,7 +128,9 @@ void CHyprRenderer::renderWorkspaceWithFullscreenWindow(CMonitor* pMonitor, CWor continue; } - // found it! + if (w->m_iWorkspaceID == pMonitor->activeWorkspace && !w->m_bIsFullscreen) + continue; + renderWindow(w.get(), pMonitor, time, pWorkspace->m_efFullscreenMode != FULLSCREEN_FULL, RENDER_PASS_ALL); pWorkspaceWindow = w.get();