mirror of
https://github.com/hyprwm/Hyprland
synced 2024-12-22 20:29:48 +01:00
config: Don't override fullscreen opacity if only two opacities are provided (#5512)
This commit is contained in:
parent
f2addfb404
commit
1343aa865d
1 changed files with 12 additions and 8 deletions
|
@ -603,19 +603,16 @@ void CWindow::applyDynamicRule(const SWindowRule& r) {
|
|||
continue;
|
||||
|
||||
if (r == "override") {
|
||||
if (opacityIDX == 1) {
|
||||
m_sSpecialRenderData.alphaOverride = true;
|
||||
m_sSpecialRenderData.alphaInactiveOverride = true;
|
||||
m_sSpecialRenderData.alphaFullscreenOverride = true;
|
||||
} else if (opacityIDX == 2)
|
||||
if (opacityIDX == 1)
|
||||
m_sSpecialRenderData.alphaOverride = true;
|
||||
else if (opacityIDX == 2)
|
||||
m_sSpecialRenderData.alphaInactiveOverride = true;
|
||||
else if (opacityIDX == 3)
|
||||
m_sSpecialRenderData.alphaFullscreenOverride = true;
|
||||
} else {
|
||||
if (opacityIDX == 0) {
|
||||
m_sSpecialRenderData.alpha = std::stof(r);
|
||||
m_sSpecialRenderData.alphaInactive = std::stof(r);
|
||||
m_sSpecialRenderData.alphaFullscreen = std::stof(r);
|
||||
m_sSpecialRenderData.alpha = std::stof(r);
|
||||
m_sSpecialRenderData.alphaOverride = false;
|
||||
} else if (opacityIDX == 1) {
|
||||
m_sSpecialRenderData.alphaInactive = std::stof(r);
|
||||
m_sSpecialRenderData.alphaInactiveOverride = false;
|
||||
|
@ -629,6 +626,13 @@ void CWindow::applyDynamicRule(const SWindowRule& r) {
|
|||
opacityIDX++;
|
||||
}
|
||||
}
|
||||
|
||||
if (opacityIDX == 1) {
|
||||
m_sSpecialRenderData.alphaInactiveOverride = m_sSpecialRenderData.alphaOverride;
|
||||
m_sSpecialRenderData.alphaInactive = m_sSpecialRenderData.alpha;
|
||||
m_sSpecialRenderData.alphaFullscreenOverride = m_sSpecialRenderData.alphaOverride;
|
||||
m_sSpecialRenderData.alphaFullscreen = m_sSpecialRenderData.alpha;
|
||||
}
|
||||
} catch (std::exception& e) { Debug::log(ERR, "Opacity rule \"{}\" failed with: {}", r.szRule, e.what()); }
|
||||
} else if (r.szRule == "noanim") {
|
||||
m_sAdditionalConfigData.forceNoAnims = true;
|
||||
|
|
Loading…
Reference in a new issue