diff options
| author | Vaxry <vaxry@vaxry.net> | 2026-04-29 17:25:21 +0100 |
|---|---|---|
| committer | Vaxry <43317083+vaxerski@users.noreply.github.com> | 2026-04-29 22:05:32 +0100 |
| commit | 55a1611fd8150d7bb8d1b6e2b8cc95ffccf31ea2 (patch) | |
| tree | 88ae2d9bcee6d327c6af97e2afb920020f16432b /src/layout/algorithm | |
| parent | a92dae5af7bad3af53f6d6b689d71ee900077569 (diff) | |
desktop/window: expand hidden into proper states
Diffstat (limited to 'src/layout/algorithm')
| -rw-r--r-- | src/layout/algorithm/tiled/monocle/MonocleAlgorithm.cpp | 15 |
1 files changed, 10 insertions, 5 deletions
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<ITarget> 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; } } |
