summaryrefslogtreecommitdiff
path: root/src/desktop/view/LayerSurface.cpp
diff options
context:
space:
mode:
authorVaxry <vaxry@vaxry.net>2025-12-16 16:32:31 +0000
committerVaxry <vaxry@vaxry.net>2025-12-16 16:32:37 +0000
commit709855842068315bb2109d8f422a70c2b5ed1931 (patch)
treeffa51758081e7ca85582e195678199a5ac9b44ba /src/desktop/view/LayerSurface.cpp
parent59438908de859e8f1901e864c1b1a3dcdeacf540 (diff)
desktop/layer: store aboveFs property and use that
Diffstat (limited to 'src/desktop/view/LayerSurface.cpp')
-rw-r--r--src/desktop/view/LayerSurface.cpp24
1 files changed, 6 insertions, 18 deletions
diff --git a/src/desktop/view/LayerSurface.cpp b/src/desktop/view/LayerSurface.cpp
index 3192321e..32d0ff61 100644
--- a/src/desktop/view/LayerSurface.cpp
+++ b/src/desktop/view/LayerSurface.cpp
@@ -164,8 +164,9 @@ void CLayerSurface::onDestroy() {
void CLayerSurface::onMap() {
Debug::log(LOG, "LayerSurface {:x} mapped", rc<uintptr_t>(m_layerSurface.get()));
- m_mapped = true;
- m_interactivity = m_layerSurface->m_current.interactivity;
+ m_mapped = true;
+ m_interactivity = m_layerSurface->m_current.interactivity;
+ m_aboveFullscreen = true;
m_ruleApplicator->propertiesChanged(Desktop::Rule::RULE_PROP_ALL);
@@ -330,23 +331,10 @@ void CLayerSurface::onCommit() {
}
}
- // update alpha when window is in fullscreen
- auto PWORKSPACE = PMONITOR->m_activeSpecialWorkspace ? PMONITOR->m_activeSpecialWorkspace : PMONITOR->m_activeWorkspace;
- if (PWORKSPACE && PWORKSPACE->m_fullscreenMode == FSMODE_FULLSCREEN) {
- // warp if switching render layer so we don't see glitches and have clean fade
- if ((m_layer == ZWLR_LAYER_SHELL_V1_LAYER_BACKGROUND || m_layer == ZWLR_LAYER_SHELL_V1_LAYER_BOTTOM) &&
- (m_layerSurface->m_current.layer == ZWLR_LAYER_SHELL_V1_LAYER_TOP || m_layerSurface->m_current.layer == ZWLR_LAYER_SHELL_V1_LAYER_OVERLAY))
- m_alpha->setValueAndWarp(0.f);
-
- // from overlay to top
- if (m_layer == ZWLR_LAYER_SHELL_V1_LAYER_OVERLAY && m_layerSurface->m_current.layer == ZWLR_LAYER_SHELL_V1_LAYER_TOP)
- *m_alpha = 0.f;
- // to overlay
- if (m_layerSurface->m_current.layer == ZWLR_LAYER_SHELL_V1_LAYER_OVERLAY)
- *m_alpha = 1.f;
- }
+ m_layer = m_layerSurface->m_current.layer;
+ m_aboveFullscreen = true;
- m_layer = m_layerSurface->m_current.layer;
+ g_pDesktopAnimationManager->setFullscreenFadeAnimation(PMONITOR->m_activeWorkspace, CDesktopAnimationManager::ANIMATION_TYPE_IN);
if (m_layer == ZWLR_LAYER_SHELL_V1_LAYER_BACKGROUND || m_layer == ZWLR_LAYER_SHELL_V1_LAYER_BOTTOM)
g_pHyprOpenGL->markBlurDirtyForMonitor(PMONITOR); // so that blur is recalc'd