summaryrefslogtreecommitdiff
path: root/src/managers
diff options
context:
space:
mode:
authorVaxry <vaxry@vaxry.net>2026-04-29 18:51:19 +0100
committerVaxry <43317083+vaxerski@users.noreply.github.com>2026-04-29 22:05:32 +0100
commit31e025dbe04dbe1836ea759f6b6e2ea09591fb23 (patch)
tree7b810a935febc522179d332786312c5d26e1ffa7 /src/managers
parent55a1611fd8150d7bb8d1b6e2b8cc95ffccf31ea2 (diff)
desktop/window: refactor over fullscreen state
Diffstat (limited to 'src/managers')
-rw-r--r--src/managers/animation/DesktopAnimationManager.cpp9
-rw-r--r--src/managers/input/InputManager.cpp4
2 files changed, 6 insertions, 7 deletions
diff --git a/src/managers/animation/DesktopAnimationManager.cpp b/src/managers/animation/DesktopAnimationManager.cpp
index 3ef9ff00..2b7cb459 100644
--- a/src/managers/animation/DesktopAnimationManager.cpp
+++ b/src/managers/animation/DesktopAnimationManager.cpp
@@ -467,10 +467,9 @@ void CDesktopAnimationManager::setFullscreenFadeAnimation(PHLWORKSPACE ws, eAnim
const auto FULLSCREEN = type == ANIMATION_TYPE_IN;
- const auto FSWINDOW = ws->getFullscreenWindow();
-
for (auto const& w : g_pCompositor->m_windows) {
if (w->m_workspace == ws) {
+ w->updateFullscreenInputState();
if (w->m_fadingOut || w->m_pinned || w->isFullscreen())
continue;
@@ -478,9 +477,7 @@ void CDesktopAnimationManager::setFullscreenFadeAnimation(PHLWORKSPACE ws, eAnim
if (!FULLSCREEN)
*w->alpha(WINDOW_ALPHA_FULLSCREEN) = 1.F;
else if (!w->isFullscreen()) {
- const bool CREATED_OVER_FS = w->m_createdOverFullscreen;
- const bool IS_IN_GROUP_OF_FS = FSWINDOW && FSWINDOW->m_group && FSWINDOW->m_group->has(w);
- *w->alpha(WINDOW_ALPHA_FULLSCREEN) = !CREATED_OVER_FS && !IS_IN_GROUP_OF_FS ? 0.f : 1.f;
+ *w->alpha(WINDOW_ALPHA_FULLSCREEN) = w->isAllowedOverFullscreen() ? 1.f : 0.f;
}
}
}
@@ -500,6 +497,7 @@ void CDesktopAnimationManager::setFullscreenFloatingFade(PHLWINDOW pWindow, floa
return;
*pWindow->alpha(WINDOW_ALPHA_FULLSCREEN) = fade;
+ pWindow->updateFullscreenInputState();
}
void CDesktopAnimationManager::overrideFullscreenFadeAmount(PHLWORKSPACE ws, float fade, PHLWINDOW exclude) {
@@ -512,6 +510,7 @@ void CDesktopAnimationManager::overrideFullscreenFadeAmount(PHLWORKSPACE ws, flo
continue;
*w->alpha(WINDOW_ALPHA_FULLSCREEN) = fade;
+ w->updateFullscreenInputState();
}
}
diff --git a/src/managers/input/InputManager.cpp b/src/managers/input/InputManager.cpp
index f0314e0d..7ed7b4f6 100644
--- a/src/managers/input/InputManager.cpp
+++ b/src/managers/input/InputManager.cpp
@@ -447,7 +447,7 @@ void CInputManager::mouseMoveUnified(uint32_t time, bool refocus, bool mouse, st
const auto& PWINDOWIDEAL = getWindowIdeal();
if (PWINDOWIDEAL &&
- ((PWINDOWIDEAL->m_isFloating && (PWINDOWIDEAL->m_createdOverFullscreen || PWINDOWIDEAL->m_pinned)) /* floating over fullscreen or pinned */
+ ((PWINDOWIDEAL->m_isFloating && PWINDOWIDEAL->isAllowedOverFullscreen()) /* floating over fullscreen or pinned */
|| (PMONITOR->m_activeSpecialWorkspace == PWINDOWIDEAL->m_workspace) /* on an open special workspace */))
pFoundWindow = PWINDOWIDEAL;
@@ -485,7 +485,7 @@ void CInputManager::mouseMoveUnified(uint32_t time, bool refocus, bool mouse, st
if (pFoundWindow != PWINDOWIDEAL)
pFoundWindow = PWINDOWIDEAL;
- if (!(pFoundWindow && (pFoundWindow->m_isFloating && (pFoundWindow->m_createdOverFullscreen || pFoundWindow->m_pinned))))
+ if (!(pFoundWindow && (pFoundWindow->m_isFloating && pFoundWindow->isAllowedOverFullscreen())))
pFoundWindow = PWORKSPACE->getFullscreenWindow();
}
}