From ca17a89d86b73f37019c4cc0c7087303adbcc1f9 Mon Sep 17 00:00:00 2001 From: Vaxry Date: Mon, 25 Mar 2024 16:08:55 +0000 Subject: renderer: allow blurring ls popups --- src/render/OpenGL.cpp | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'src/render/OpenGL.cpp') diff --git a/src/render/OpenGL.cpp b/src/render/OpenGL.cpp index df03e8e9..f5cf2624 100644 --- a/src/render/OpenGL.cpp +++ b/src/render/OpenGL.cpp @@ -147,6 +147,7 @@ bool CHyprOpenGLImpl::passRequiresIntrospection(CMonitor* pMonitor) { static auto PXRAY = CConfigValue("decoration:blur:xray"); static auto POPTIM = CConfigValue("decoration:blur:new_optimizations"); static auto PBLURSPECIAL = CConfigValue("decoration:blur:special"); + static auto PBLURPOPUPS = CConfigValue("decoration:blur:popups"); if (m_RenderData.mouseZoomFactor != 1.0 || g_pHyprRenderer->m_bCrashingInProgress) return true; @@ -167,23 +168,35 @@ bool CHyprOpenGLImpl::passRequiresIntrospection(CMonitor* pMonitor) { const auto XRAYMODE = ls->xray == -1 ? *PXRAY : ls->xray; if (ls->forceBlur && !XRAYMODE) return true; + + if (ls->popupsCount() > 0 && ls->forceBlurPopups) + return true; } for (auto& ls : pMonitor->m_aLayerSurfaceLayers[ZWLR_LAYER_SHELL_V1_LAYER_TOP]) { const auto XRAYMODE = ls->xray == -1 ? *PXRAY : ls->xray; if (ls->forceBlur && !XRAYMODE) return true; + + if (ls->popupsCount() > 0 && ls->forceBlurPopups) + return true; } // these two block optimization for (auto& ls : pMonitor->m_aLayerSurfaceLayers[ZWLR_LAYER_SHELL_V1_LAYER_BACKGROUND]) { if (ls->forceBlur) return true; + + if (ls->popupsCount() > 0 && ls->forceBlurPopups) + return true; } for (auto& ls : pMonitor->m_aLayerSurfaceLayers[ZWLR_LAYER_SHELL_V1_LAYER_BOTTOM]) { if (ls->forceBlur) return true; + + if (ls->popupsCount() > 0 && ls->forceBlurPopups) + return true; } if (*PBLURSPECIAL) { @@ -202,12 +215,18 @@ bool CHyprOpenGLImpl::passRequiresIntrospection(CMonitor* pMonitor) { return false; for (auto& w : g_pCompositor->m_vWindows) { - if (!w->m_bIsMapped || w->isHidden() || (!w->m_bIsFloating && *POPTIM && !g_pCompositor->isWorkspaceSpecial(w->m_iWorkspaceID))) + if (!w->m_bIsMapped || w->isHidden()) continue; if (!g_pHyprRenderer->shouldRenderWindow(w.get())) continue; + if (w->popupsCount() > 0 && *PBLURPOPUPS) + return true; + + if (!w->m_bIsFloating && *POPTIM && !g_pCompositor->isWorkspaceSpecial(w->m_iWorkspaceID)) + continue; + if (w->m_sAdditionalConfigData.forceNoBlur.toUnderlying() == true || w->m_sAdditionalConfigData.xray.toUnderlying() == true) continue; -- cgit v1.2.3