From 21f64b666069f3ef4454723ad04af2422b4cad30 Mon Sep 17 00:00:00 2001 From: zakk4223 Date: Wed, 12 Jul 2023 06:58:45 -0400 Subject: [PATCH] Keep new mapped layer's alpha zero if the workspace has a fullscreen window (#2686) Co-authored-by: Zakk --- src/events/Layers.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/events/Layers.cpp b/src/events/Layers.cpp index bc01bc5e..01849867 100644 --- a/src/events/Layers.cpp +++ b/src/events/Layers.cpp @@ -157,9 +157,11 @@ void Events::listener_mapLayerSurface(void* owner, void* data) { wlr_box geomFixed = {layersurface->geometry.x + PMONITOR->vecPosition.x, layersurface->geometry.y + PMONITOR->vecPosition.y, layersurface->geometry.width, layersurface->geometry.height}; g_pHyprRenderer->damageBox(&geomFixed); + const auto WORKSPACE = g_pCompositor->getWorkspaceByID(PMONITOR->activeWorkspace); + const bool FULLSCREEN = WORKSPACE->m_bHasFullscreenWindow && WORKSPACE->m_efFullscreenMode == FULLSCREEN_FULL; layersurface->alpha.setValue(0); - layersurface->alpha = 1.f; + layersurface->alpha = ((layersurface->layer == ZWLR_LAYER_SHELL_V1_LAYER_TOP && FULLSCREEN) ? 0.f : 1.f); layersurface->readyToDelete = false; layersurface->fadingOut = false;