From 55a1611fd8150d7bb8d1b6e2b8cc95ffccf31ea2 Mon Sep 17 00:00:00 2001 From: Vaxry Date: Wed, 29 Apr 2026 17:25:21 +0100 Subject: desktop/window: expand hidden into proper states --- src/layout/algorithm/tiled/monocle/MonocleAlgorithm.cpp | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'src/layout/algorithm/tiled/monocle/MonocleAlgorithm.cpp') diff --git a/src/layout/algorithm/tiled/monocle/MonocleAlgorithm.cpp b/src/layout/algorithm/tiled/monocle/MonocleAlgorithm.cpp index 36c59a4e..84b4f9e2 100644 --- a/src/layout/algorithm/tiled/monocle/MonocleAlgorithm.cpp +++ b/src/layout/algorithm/tiled/monocle/MonocleAlgorithm.cpp @@ -46,8 +46,10 @@ CMonocleAlgorithm::~CMonocleAlgorithm() { continue; const auto WINDOW = TARGET->window(); - if (WINDOW) - WINDOW->setHidden(false); + if (WINDOW) { + WINDOW->setInputBlocked(Desktop::View::INPUT_BLOCK_MONOCLE_INACTIVE, false); + *WINDOW->alpha(Desktop::View::WINDOW_ALPHA_LAYOUT) = 1.F; + } } m_focusCallback.reset(); @@ -81,8 +83,10 @@ void CMonocleAlgorithm::removeTarget(SP target) { // unhide window when removing from monocle layout const auto WINDOW = target->window(); - if (WINDOW) - WINDOW->setHidden(false); + if (WINDOW) { + WINDOW->setInputBlocked(Desktop::View::INPUT_BLOCK_MONOCLE_INACTIVE, false); + *WINDOW->alpha(Desktop::View::WINDOW_ALPHA_LAYOUT) = 1.F; + } const auto INDEX = std::distance(m_targetDatas.begin(), it); m_targetDatas.erase(it); @@ -142,7 +146,8 @@ void CMonocleAlgorithm::recalculate() { TARGET->setPositionGlobal(WORK_AREA); const bool SHOULD_BE_VISIBLE = ((int)i == m_currentVisibleIndex); - WINDOW->setHidden(!SHOULD_BE_VISIBLE); + WINDOW->setInputBlocked(Desktop::View::INPUT_BLOCK_MONOCLE_INACTIVE, !SHOULD_BE_VISIBLE); + *WINDOW->alpha(Desktop::View::WINDOW_ALPHA_LAYOUT) = SHOULD_BE_VISIBLE ? 1.F : 0.F; } } -- cgit v1.2.3