mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-07 07:31:53 -07:00
@@ -173,6 +173,7 @@ void CConfigManager::setDefaultVars() {
|
||||
configValues["decoration:blur:noise"].floatValue = 0.0117;
|
||||
configValues["decoration:blur:special"].intValue = 0;
|
||||
configValues["decoration:blur:popups"].intValue = 0;
|
||||
configValues["decoration:blur:popups_ignorealpha"].floatValue = 0.2;
|
||||
configValues["decoration:active_opacity"].floatValue = 1;
|
||||
configValues["decoration:inactive_opacity"].floatValue = 1;
|
||||
configValues["decoration:fullscreen_opacity"].floatValue = 1;
|
||||
|
@@ -51,6 +51,7 @@ CHyprRenderer::CHyprRenderer() {
|
||||
|
||||
static void renderSurface(struct wlr_surface* surface, int x, int y, void* data) {
|
||||
static auto* const PBLURPOPUPS = &g_pConfigManager->getConfigValuePtr("decoration:blur:popups")->intValue;
|
||||
static auto* const PBLURPOPUPSIGNOREALPHA = &g_pConfigManager->getConfigValuePtr("decoration:blur:popups_ignorealpha")->floatValue;
|
||||
|
||||
const auto TEXTURE = wlr_surface_get_texture(surface);
|
||||
const auto RDATA = (SRenderData*)data;
|
||||
@@ -136,9 +137,16 @@ 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 {
|
||||
if (RDATA->blur && RDATA->popup && *PBLURPOPUPS)
|
||||
if (RDATA->blur && RDATA->popup && *PBLURPOPUPS) {
|
||||
|
||||
if (*PBLURPOPUPSIGNOREALPHA != 1.f) {
|
||||
g_pHyprOpenGL->m_RenderData.discardMode |= DISCARD_ALPHA;
|
||||
g_pHyprOpenGL->m_RenderData.discardOpacity = *PBLURPOPUPSIGNOREALPHA;
|
||||
}
|
||||
|
||||
g_pHyprOpenGL->renderTextureWithBlur(TEXTURE, &windowBox, RDATA->fadeAlpha * RDATA->alpha, surface, rounding, true);
|
||||
else
|
||||
g_pHyprOpenGL->m_RenderData.discardMode &= ~DISCARD_ALPHA;
|
||||
} else
|
||||
g_pHyprOpenGL->renderTexture(TEXTURE, &windowBox, RDATA->fadeAlpha * RDATA->alpha, rounding, true);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user