diff --git a/src/config/ConfigManager.cpp b/src/config/ConfigManager.cpp index 7e4ce769..c61640cf 100644 --- a/src/config/ConfigManager.cpp +++ b/src/config/ConfigManager.cpp @@ -172,6 +172,7 @@ void CConfigManager::setDefaultVars() { configValues["decoration:blur:vibrancy_darkness"].floatValue = 0.0; configValues["decoration:blur:noise"].floatValue = 0.0117; configValues["decoration:blur:special"].intValue = 0; + configValues["decoration:blur:popups"].intValue = 0; configValues["decoration:active_opacity"].floatValue = 1; configValues["decoration:inactive_opacity"].floatValue = 1; configValues["decoration:fullscreen_opacity"].floatValue = 1; diff --git a/src/helpers/WLClasses.hpp b/src/helpers/WLClasses.hpp index 644a6bdb..be0fd005 100644 --- a/src/helpers/WLClasses.hpp +++ b/src/helpers/WLClasses.hpp @@ -97,6 +97,8 @@ struct SRenderData { // for calculating UV CWindow* pWindow = nullptr; + + bool popup = false; }; struct SExtensionFindingData { @@ -180,7 +182,8 @@ struct SConstraint { Vector2D getLogicConstraintPos(); Vector2D getLogicConstraintSize(); - bool operator==(const SConstraint& b) const { + // + bool operator==(const SConstraint& b) const { return constraint == b.constraint; } }; diff --git a/src/render/Renderer.cpp b/src/render/Renderer.cpp index bb72398b..abd42e46 100644 --- a/src/render/Renderer.cpp +++ b/src/render/Renderer.cpp @@ -50,8 +50,10 @@ CHyprRenderer::CHyprRenderer() { } static void renderSurface(struct wlr_surface* surface, int x, int y, void* data) { - const auto TEXTURE = wlr_surface_get_texture(surface); - const auto RDATA = (SRenderData*)data; + static auto* const PBLURPOPUPS = &g_pConfigManager->getConfigValuePtr("decoration:blur:popups")->intValue; + + const auto TEXTURE = wlr_surface_get_texture(surface); + const auto RDATA = (SRenderData*)data; if (!TEXTURE) return; @@ -134,7 +136,10 @@ static void renderSurface(struct wlr_surface* surface, int x, int y, void* data) g_pHyprOpenGL->renderTexture(TEXTURE, &windowBox, RDATA->fadeAlpha * RDATA->alpha, rounding, true); } } else { - g_pHyprOpenGL->renderTexture(TEXTURE, &windowBox, RDATA->fadeAlpha * RDATA->alpha, rounding, true); + if (RDATA->blur && RDATA->popup && *PBLURPOPUPS) + g_pHyprOpenGL->renderTextureWithBlur(TEXTURE, &windowBox, RDATA->fadeAlpha * RDATA->alpha, surface, rounding, true); + else + g_pHyprOpenGL->renderTexture(TEXTURE, &windowBox, RDATA->fadeAlpha * RDATA->alpha, rounding, true); } if (!g_pHyprRenderer->m_bBlockSurfaceFeedback) { @@ -544,6 +549,7 @@ void CHyprRenderer::renderWindow(CWindow* pWindow, CMonitor* pMonitor, timespec* renderdata.dontRound = true; // don't round popups renderdata.pMonitor = pMonitor; renderdata.squishOversized = false; // don't squish popups + renderdata.popup = true; if (pWindow->m_sAdditionalConfigData.nearestNeighbor.toUnderlying()) g_pHyprOpenGL->m_RenderData.useNearestNeighbor = true; @@ -597,6 +603,7 @@ void CHyprRenderer::renderLayer(SLayerSurface* pLayer, CMonitor* pMonitor, times renderdata.squishOversized = false; // don't squish popups renderdata.dontRound = true; + renderdata.popup = true; wlr_layer_surface_v1_for_each_popup_surface(pLayer->layerSurface, renderSurface, &renderdata); g_pHyprOpenGL->m_pCurrentLayer = nullptr;