diff --git a/src/config/ConfigManager.cpp b/src/config/ConfigManager.cpp index 3a093a29..d6edc672 100644 --- a/src/config/ConfigManager.cpp +++ b/src/config/ConfigManager.cpp @@ -29,6 +29,8 @@ CConfigManager::CConfigManager() { configValues["decoration:blur"].intValue = 1; configValues["decoration:blur_size"].intValue = 8; configValues["decoration:blur_passes"].intValue = 1; + configValues["decoration:active_opacity"].floatValue = 1; + configValues["decoration:inactive_opacity"].floatValue = 1; configValues["dwindle:pseudotile"].intValue = 0; configValues["dwindle:col.group_border"].intValue = 0x66777700; diff --git a/src/render/Renderer.cpp b/src/render/Renderer.cpp index 77ba17fe..6bcda2b8 100644 --- a/src/render/Renderer.cpp +++ b/src/render/Renderer.cpp @@ -89,7 +89,7 @@ void CHyprRenderer::renderWindow(CWindow* pWindow, SMonitor* pMonitor, timespec* renderdata.w = pWindow->m_vRealSize.x; renderdata.h = pWindow->m_vRealSize.y; renderdata.dontRound = pWindow->m_bIsFullscreen; - renderdata.fadeAlpha = pWindow->m_fAlpha; + renderdata.fadeAlpha = pWindow->m_fAlpha * (pWindow == g_pCompositor->m_pLastWindow ? g_pConfigManager->getFloat("decoration:active_opacity") : g_pConfigManager->getFloat("decoration:inactive_opacity")); wlr_surface_for_each_surface(g_pXWaylandManager->getWindowSurface(pWindow), renderSurface, &renderdata);