mirror of
https://github.com/hyprwm/Hyprland
synced 2024-12-23 06:29:50 +01:00
Merge pull request #84 from Four-Griffins/main
Opacity setting for fullscreen windows
This commit is contained in:
commit
48b8ab3f65
2 changed files with 4 additions and 2 deletions
|
@ -42,6 +42,7 @@ void CConfigManager::setDefaultVars() {
|
||||||
configValues["decoration:blur_passes"].intValue = 1;
|
configValues["decoration:blur_passes"].intValue = 1;
|
||||||
configValues["decoration:active_opacity"].floatValue = 1;
|
configValues["decoration:active_opacity"].floatValue = 1;
|
||||||
configValues["decoration:inactive_opacity"].floatValue = 1;
|
configValues["decoration:inactive_opacity"].floatValue = 1;
|
||||||
|
configValues["decoration:fullscreen_opacity"].floatValue = 1;
|
||||||
|
|
||||||
configValues["dwindle:pseudotile"].intValue = 0;
|
configValues["dwindle:pseudotile"].intValue = 0;
|
||||||
configValues["dwindle:col.group_border"].intValue = 0x66777700;
|
configValues["dwindle:col.group_border"].intValue = 0x66777700;
|
||||||
|
|
|
@ -97,7 +97,8 @@ void CHyprRenderer::renderWindow(CWindow* pWindow, SMonitor* pMonitor, timespec*
|
||||||
renderdata.h = pWindow->m_vRealSize.vec().y;
|
renderdata.h = pWindow->m_vRealSize.vec().y;
|
||||||
renderdata.dontRound = pWindow->m_bIsFullscreen;
|
renderdata.dontRound = pWindow->m_bIsFullscreen;
|
||||||
renderdata.fadeAlpha = pWindow->m_fAlpha.fl() * (PWORKSPACE->m_fAlpha.fl() / 255.f);
|
renderdata.fadeAlpha = pWindow->m_fAlpha.fl() * (PWORKSPACE->m_fAlpha.fl() / 255.f);
|
||||||
renderdata.alpha = pWindow == g_pCompositor->m_pLastWindow ? g_pConfigManager->getFloat("decoration:active_opacity") : g_pConfigManager->getFloat("decoration:inactive_opacity");
|
renderdata.alpha = pWindow->m_bIsFullscreen ? g_pConfigManager->getFloat("decoration:fullscreen_opacity") :
|
||||||
|
pWindow == g_pCompositor->m_pLastWindow ? g_pConfigManager->getFloat("decoration:active_opacity") : g_pConfigManager->getFloat("decoration:inactive_opacity");
|
||||||
|
|
||||||
// apply window special data
|
// apply window special data
|
||||||
renderdata.alpha *= pWindow->m_sSpecialRenderData.alpha;
|
renderdata.alpha *= pWindow->m_sSpecialRenderData.alpha;
|
||||||
|
|
Loading…
Reference in a new issue