mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-26 16:45:59 +01:00
renderer: update alpha of layers only if active ws (#2994)
update `alpha` of ZWLR_LAYER_SHELL_V1_LAYER_TOP only when Workspaces is active on the monitor.
This commit is contained in:
parent
cb59763d32
commit
9ad4a96d18
1 changed files with 5 additions and 3 deletions
|
@ -2087,9 +2087,11 @@ void CCompositor::updateFullscreenFadeOnWorkspace(CWorkspace* pWorkspace) {
|
|||
|
||||
const auto PMONITOR = getMonitorFromID(pWorkspace->m_iMonitorID);
|
||||
|
||||
for (auto& ls : PMONITOR->m_aLayerSurfaceLayers[ZWLR_LAYER_SHELL_V1_LAYER_TOP]) {
|
||||
if (!ls->fadingOut)
|
||||
ls->alpha = FULLSCREEN && pWorkspace->m_efFullscreenMode == FULLSCREEN_FULL ? 0.f : 1.f;
|
||||
if (pWorkspace->m_iID == PMONITOR->activeWorkspace) {
|
||||
for (auto& ls : PMONITOR->m_aLayerSurfaceLayers[ZWLR_LAYER_SHELL_V1_LAYER_TOP]) {
|
||||
if (!ls->fadingOut)
|
||||
ls->alpha = FULLSCREEN && pWorkspace->m_efFullscreenMode == FULLSCREEN_FULL ? 0.f : 1.f;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue