aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorthejch <[email protected]>2024-04-01 08:16:18 -0700
committerGitHub <[email protected]>2024-04-01 16:16:18 +0100
commit800dbf71b0db04bf43ff5a87a9cff6e48de325a2 (patch)
treecdf683f1a04254c2d7c7ac437fad25abc87df5ab
parent416b3d6167a996c7e94bd537cec20a12a0784efa (diff)
downloadHyprland-800dbf71b0db04bf43ff5a87a9cff6e48de325a2.tar.gz
Hyprland-800dbf71b0db04bf43ff5a87a9cff6e48de325a2.zip
renderer: Fix rendering when swiping workspaces (#5367)
* fix rendering on swiping * add alpha check * fix floating fs check
-rw-r--r--src/render/Renderer.cpp15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/render/Renderer.cpp b/src/render/Renderer.cpp
index 18110256..aecd9524 100644
--- a/src/render/Renderer.cpp
+++ b/src/render/Renderer.cpp
@@ -225,13 +225,16 @@ bool CHyprRenderer::shouldRenderWindow(CWindow* pWindow, CMonitor* pMonitor) {
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) {
+ if (PWINDOWWORKSPACE->m_vRenderOffset.isBeingAnimated() || PWINDOWWORKSPACE->m_fAlpha.isBeingAnimated() || PWINDOWWORKSPACE->m_bForceRendering)
return true;
- } else {
- if (PWINDOWWORKSPACE->m_bHasFullscreenWindow && !pWindow->m_bIsFullscreen && !pWindow->m_bIsFloating && !pWindow->m_bCreatedOverFullscreen &&
- pWindow->m_fAlpha.value() == 0)
- return false;
- }
+
+ // if hidden behind fullscreen
+ if (PWINDOWWORKSPACE->m_bHasFullscreenWindow && !pWindow->m_bIsFullscreen && (!pWindow->m_bIsFloating || !pWindow->m_bCreatedOverFullscreen) &&
+ pWindow->m_fAlpha.value() == 0)
+ return false;
+
+ if (!PWINDOWWORKSPACE->m_vRenderOffset.isBeingAnimated() && !PWINDOWWORKSPACE->m_fAlpha.isBeingAnimated() && !g_pCompositor->isWorkspaceVisible(pWindow->m_iWorkspaceID))
+ return false;
}
if (pWindow->m_iMonitorID == pMonitor->ID)