summaryrefslogtreecommitdiff
path: root/src
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
parent55a1611fd8150d7bb8d1b6e2b8cc95ffccf31ea2 (diff)
desktop/window: refactor over fullscreen state
Diffstat (limited to 'src')
-rw-r--r--src/Compositor.cpp38
-rw-r--r--src/Compositor.hpp6
-rw-r--r--src/config/lua/objects/LuaWindow.cpp2
-rw-r--r--src/config/shared/actions/ConfigActions.cpp6
-rw-r--r--src/desktop/Workspace.cpp4
-rw-r--r--src/desktop/state/FocusState.cpp1
-rw-r--r--src/desktop/view/Window.cpp50
-rw-r--r--src/desktop/view/Window.hpp11
-rw-r--r--src/helpers/Monitor.cpp2
-rw-r--r--src/layout/LayoutManager.cpp2
-rw-r--r--src/layout/supplementary/DragController.cpp2
-rw-r--r--src/managers/animation/DesktopAnimationManager.cpp9
-rw-r--r--src/managers/input/InputManager.cpp4
-rw-r--r--src/render/Renderer.cpp9
14 files changed, 113 insertions, 33 deletions
diff --git a/src/Compositor.cpp b/src/Compositor.cpp
index 19fe6d75..14a7843e 100644
--- a/src/Compositor.cpp
+++ b/src/Compositor.cpp
@@ -968,7 +968,7 @@ PHLWINDOW CCompositor::vectorToWindowUnified(const Vector2D& pos, uint16_t prope
}
if (w->m_isFloating && w->m_isMapped && w->m_workspace->isVisible() && w->acceptsInput() && !w->m_pinned && !w->m_ruleApplicator->noFocus().valueOrDefault() &&
- w != pIgnoreWindow && (!aboveFullscreen || w->m_createdOverFullscreen) && !isShadowedByModal(w)) {
+ w != pIgnoreWindow && (!aboveFullscreen || w->isAllowedOverFullscreen()) && !isShadowedByModal(w)) {
// OR windows should add focus to parent
if (w->m_X11ShouldntFocus && !w->isX11OverrideRedirect())
continue;
@@ -1310,6 +1310,9 @@ void CCompositor::changeWindowZOrder(PHLWINDOW pWindow, bool top) {
else
pWindow->m_createdOverFullscreen = false;
+ pWindow->updateFullscreenInputState();
+ *pWindow->alpha(WINDOW_ALPHA_FULLSCREEN) = pWindow->isBlockedByFullscreen() ? 0.F : 1.F;
+
if (pWindow == (top ? m_windows.back() : m_windows.front()))
return;
@@ -1521,7 +1524,7 @@ PHLWINDOW CCompositor::getWindowInDirection(const CBox& box, PHLWORKSPACE pWorks
if (pWorkspace->m_monitor == w->m_monitor && pWorkspace != w->m_workspace)
continue;
- if (pWorkspace->m_hasFullscreenWindow && !w->isFullscreen() && !w->m_createdOverFullscreen)
+ if (pWorkspace->m_hasFullscreenWindow && !w->isAllowedOverFullscreen())
continue;
if (!*PMONITORFALLBACK && pWorkspace->m_monitor != w->m_monitor)
@@ -1600,7 +1603,7 @@ PHLWINDOW CCompositor::getWindowInDirection(const CBox& box, PHLWORKSPACE pWorks
if (pWorkspace->m_monitor == w->m_monitor && pWorkspace != w->m_workspace)
continue;
- if (pWorkspace->m_hasFullscreenWindow && !w->isFullscreen() && !w->m_createdOverFullscreen)
+ if (pWorkspace->m_hasFullscreenWindow && !w->isAllowedOverFullscreen())
continue;
if (!*PMONITORFALLBACK && pWorkspace->m_monitor != w->m_monitor)
@@ -1640,9 +1643,18 @@ static bool isFloatingMatches(WINDOWPTR w, std::optional<bool> floating) {
}
template <typename WINDOWPTR>
-static bool isWindowAvailableForCycle(WINDOWPTR pWindow, WINDOWPTR w, bool focusableOnly, std::optional<bool> floating, bool anyWorkspace = false) {
+static bool acceptsInputForCycle(WINDOWPTR w, bool allowFullscreenBlocked) {
+ if (w->acceptsInput())
+ return true;
+
+ return allowFullscreenBlocked && !w->isHidden() && w->isInputBlockedOnly(INPUT_BLOCK_BELOW_FULLSCREEN);
+}
+
+template <typename WINDOWPTR>
+static bool isWindowAvailableForCycle(WINDOWPTR pWindow, WINDOWPTR w, bool focusableOnly, std::optional<bool> floating, bool anyWorkspace = false,
+ bool allowFullscreenBlocked = false) {
return isFloatingMatches(w, floating) &&
- (w != pWindow && isWorkspaceMatches(pWindow, w, anyWorkspace) && w->m_isMapped && w->acceptsInput() &&
+ (w != pWindow && isWorkspaceMatches(pWindow, w, anyWorkspace) && w->m_isMapped && acceptsInputForCycle(w, allowFullscreenBlocked) &&
(!focusableOnly || !w->m_ruleApplicator->noFocus().valueOrDefault()));
}
@@ -1664,16 +1676,16 @@ static PHLWINDOW getWeakWindowPred(Iterator cur, Iterator end, Iterator begin, c
return IN_OTHER_SIDE->lock();
}
-PHLWINDOW CCompositor::getWindowCycleHist(PHLWINDOWREF cur, bool focusableOnly, std::optional<bool> floating, bool visible, bool next) {
- const auto FINDER = [&](const PHLWINDOWREF& w) { return isWindowAvailableForCycle(cur, w, focusableOnly, floating, visible); };
+PHLWINDOW CCompositor::getWindowCycleHist(PHLWINDOWREF cur, bool focusableOnly, std::optional<bool> floating, bool visible, bool next, bool allowFullscreenBlocked) {
+ const auto FINDER = [&](const PHLWINDOWREF& w) { return isWindowAvailableForCycle(cur, w, focusableOnly, floating, visible, allowFullscreenBlocked); };
// also m_vWindowFocusHistory has reverse order, so when it is next - we need to reverse again
const auto& HISTORY = Desktop::History::windowTracker()->fullHistory();
return next ? getWeakWindowPred(std::ranges::find(HISTORY, cur), HISTORY.end(), HISTORY.begin(), FINDER) :
getWeakWindowPred(std::ranges::find(HISTORY | std::views::reverse, cur), HISTORY.rend(), HISTORY.rbegin(), FINDER);
}
-PHLWINDOW CCompositor::getWindowCycle(PHLWINDOW cur, bool focusableOnly, std::optional<bool> floating, bool visible, bool prev) {
- const auto FINDER = [&](const PHLWINDOW& w) { return isWindowAvailableForCycle(cur, w, focusableOnly, floating, visible); };
+PHLWINDOW CCompositor::getWindowCycle(PHLWINDOW cur, bool focusableOnly, std::optional<bool> floating, bool visible, bool prev, bool allowFullscreenBlocked) {
+ const auto FINDER = [&](const PHLWINDOW& w) { return isWindowAvailableForCycle(cur, w, focusableOnly, floating, visible, allowFullscreenBlocked); };
return prev ? getWindowPred(std::ranges::find(m_windows | std::views::reverse, cur), m_windows.rend(), m_windows.rbegin(), FINDER) :
getWindowPred(std::ranges::find(m_windows, cur), m_windows.end(), m_windows.begin(), FINDER);
}
@@ -2259,8 +2271,12 @@ void CCompositor::setWindowFullscreenState(const PHLWINDOW PWINDOW, Desktop::Vie
// make all windows and layers on the same workspace under the fullscreen window
for (auto const& w : m_windows) {
- if (w->m_workspace == PWORKSPACE && !w->isFullscreen() && !w->m_fadingOut && !w->m_pinned)
- w->m_createdOverFullscreen = false;
+ if (w->m_workspace == PWORKSPACE) {
+ if (!w->isFullscreen() && !w->m_fadingOut && !w->m_pinned)
+ w->m_createdOverFullscreen = false;
+
+ w->updateFullscreenInputState();
+ }
}
for (auto const& ls : m_layers) {
if (ls->m_monitor == PMONITOR)
diff --git a/src/Compositor.hpp b/src/Compositor.hpp
index 8f2db1a5..7fbc7d52 100644
--- a/src/Compositor.hpp
+++ b/src/Compositor.hpp
@@ -117,8 +117,10 @@ class CCompositor {
void cleanupFadingOut(const MONITORID& monid);
PHLWINDOW getWindowInDirection(PHLWINDOW, Math::eDirection);
PHLWINDOW getWindowInDirection(const CBox& box, PHLWORKSPACE pWorkspace, Math::eDirection dir, PHLWINDOW ignoreWindow = nullptr, bool useVectorAngles = false);
- PHLWINDOW getWindowCycle(PHLWINDOW cur, bool focusableOnly = false, std::optional<bool> floating = std::nullopt, bool visible = false, bool prev = false);
- PHLWINDOW getWindowCycleHist(PHLWINDOWREF cur, bool focusableOnly = false, std::optional<bool> floating = std::nullopt, bool visible = false, bool next = false);
+ PHLWINDOW getWindowCycle(PHLWINDOW cur, bool focusableOnly = false, std::optional<bool> floating = std::nullopt, bool visible = false, bool prev = false,
+ bool allowFullscreenBlocked = false);
+ PHLWINDOW getWindowCycleHist(PHLWINDOWREF cur, bool focusableOnly = false, std::optional<bool> floating = std::nullopt, bool visible = false, bool next = false,
+ bool allowFullscreenBlocked = false);
WORKSPACEID getNextAvailableNamedWorkspace();
bool isPointOnAnyMonitor(const Vector2D&);
bool isPointOnReservedArea(const Vector2D& point, const PHLMONITOR monitor = nullptr);
diff --git a/src/config/lua/objects/LuaWindow.cpp b/src/config/lua/objects/LuaWindow.cpp
index b1a71aaa..1d933462 100644
--- a/src/config/lua/objects/LuaWindow.cpp
+++ b/src/config/lua/objects/LuaWindow.cpp
@@ -73,7 +73,7 @@ static int windowIndex(lua_State* L) {
lua_pushboolean(L, w->isHidden());
else if (key == "visible")
lua_pushboolean(L, w->visible());
- else if (key == "acceptsInput")
+ else if (key == "accepts_input")
lua_pushboolean(L, w->acceptsInput());
else if (key == "at") {
lua_newtable(L);
diff --git a/src/config/shared/actions/ConfigActions.cpp b/src/config/shared/actions/ConfigActions.cpp
index c36a149f..1664df18 100644
--- a/src/config/shared/actions/ConfigActions.cpp
+++ b/src/config/shared/actions/ConfigActions.cpp
@@ -230,6 +230,8 @@ ActionResult Actions::pinWindow(eTogglableAction action, std::optional<PHLWINDOW
return {};
window->m_pinned = wantPin;
+ window->updateFullscreenInputState();
+ *window->alpha(Desktop::View::WINDOW_ALPHA_FULLSCREEN) = window->isBlockedByFullscreen() ? 0.F : 1.F;
const auto PMONITOR = window->m_monitor.lock();
if (!PMONITOR)
@@ -349,7 +351,7 @@ ActionResult Actions::moveFocus(Math::eDirection dir) {
}
const auto PWINDOWTOCHANGETO = *PFULLCYCLE && PLASTWINDOW->isFullscreen() ?
- g_pCompositor->getWindowCycle(PLASTWINDOW, true, {}, false, dir != Math::DIRECTION_DOWN && dir != Math::DIRECTION_RIGHT) :
+ g_pCompositor->getWindowCycle(PLASTWINDOW, true, {}, false, dir != Math::DIRECTION_DOWN && dir != Math::DIRECTION_RIGHT, true) :
g_pCompositor->getWindowInDirection(PLASTWINDOW, dir);
if (*PGROUPCYCLE && PLASTWINDOW->m_group) {
@@ -1651,7 +1653,7 @@ ActionResult Actions::cycleNext(const bool next, std::optional<bool> onlyTiled,
if (onlyFloating.value_or(false))
floatStatus = true;
- const auto& cycled = g_pCompositor->getWindowCycle(window, true, floatStatus, false, !next);
+ const auto& cycled = g_pCompositor->getWindowCycle(window, true, floatStatus, false, !next, window->m_workspace && window->m_workspace->m_hasFullscreenWindow);
switchToWindow(cycled);
diff --git a/src/desktop/Workspace.cpp b/src/desktop/Workspace.cpp
index e6f0c306..6d8e6cb4 100644
--- a/src/desktop/Workspace.cpp
+++ b/src/desktop/Workspace.cpp
@@ -426,7 +426,7 @@ int CWorkspace::getWindows(std::optional<bool> onlyTiled, std::optional<bool> on
continue;
if (onlyPinned.has_value() && (!t->window() || t->window()->m_pinned != onlyPinned.value()))
continue;
- if (onlyVisible.has_value() && (!t->window() || t->window()->visible() != onlyVisible.value()))
+ if (onlyVisible.has_value() && (!t->window() || t->window()->targetVisible() != onlyVisible.value()))
continue;
no++;
}
@@ -445,7 +445,7 @@ int CWorkspace::getGroups(std::optional<bool> onlyTiled, std::optional<bool> onl
continue;
if (onlyPinned.has_value() && HEAD->m_pinned != onlyPinned.value())
continue;
- if (onlyVisible.has_value() && g->current()->visible() != onlyVisible.value())
+ if (onlyVisible.has_value() && g->current()->targetVisible() != onlyVisible.value())
continue;
no++;
}
diff --git a/src/desktop/state/FocusState.cpp b/src/desktop/state/FocusState.cpp
index 4658a32e..5db4bac5 100644
--- a/src/desktop/state/FocusState.cpp
+++ b/src/desktop/state/FocusState.cpp
@@ -37,6 +37,7 @@ static SFullscreenWorkspaceFocusResult onFullscreenWorkspaceFocusWindow(PHLWINDO
if (pWindow->m_isFloating) {
// if the window is floating, just bring it to the top
pWindow->m_createdOverFullscreen = true;
+ pWindow->updateFullscreenInputState();
g_pDesktopAnimationManager->setFullscreenFloatingFade(pWindow, 1.f);
g_pHyprRenderer->damageWindow(pWindow);
return {};
diff --git a/src/desktop/view/Window.cpp b/src/desktop/view/Window.cpp
index 73c4378d..b2f4821b 100644
--- a/src/desktop/view/Window.cpp
+++ b/src/desktop/view/Window.cpp
@@ -512,6 +512,8 @@ void CWindow::moveToWorkspace(PHLWORKSPACE pWorkspace) {
}
m_workspace = pWorkspace;
+ updateFullscreenInputState();
+ *alpha(WINDOW_ALPHA_FULLSCREEN) = isBlockedByFullscreen() ? 0.F : 1.F;
setAnimationsToMove();
@@ -750,10 +752,44 @@ bool CWindow::isInputBlocked(eWindowInputBlockReason reason) const {
return (m_inputBlockReasons & sc<uint32_t>(reason)) != 0;
}
+bool CWindow::isInputBlockedOnly(eWindowInputBlockReason reason) const {
+ return m_inputBlockReasons == sc<uint32_t>(reason);
+}
+
bool CWindow::acceptsInput() const {
return !isHidden() && !isInputBlocked();
}
+bool CWindow::isAllowedOverFullscreen() const {
+ if (isFullscreen() || m_pinned || m_createdOverFullscreen)
+ return true;
+
+ if (!m_workspace)
+ return false;
+
+ const auto FSWINDOW = m_workspace->getFullscreenWindow();
+ return FSWINDOW && FSWINDOW->m_group && FSWINDOW->m_group->has(m_self.lock());
+}
+
+bool CWindow::isBlockedByFullscreen() const {
+ if (!m_workspace || !m_workspace->m_hasFullscreenWindow)
+ return false;
+
+ return !isAllowedOverFullscreen();
+}
+
+bool CWindow::isFadingOutUnderFullscreen() const {
+ return isBlockedByFullscreen() && alpha(WINDOW_ALPHA_FULLSCREEN)->isBeingAnimated() && alphaValue(WINDOW_ALPHA_FULLSCREEN) > 0.F;
+}
+
+bool CWindow::shouldRenderOverFullscreen() const {
+ return isAllowedOverFullscreen() || isFadingOutUnderFullscreen();
+}
+
+void CWindow::updateFullscreenInputState() {
+ setInputBlocked(INPUT_BLOCK_BELOW_FULLSCREEN, isBlockedByFullscreen());
+}
+
PHLANIMVAR<float>& CWindow::alpha(eWindowAlpha type) {
return m_alpha.get(type);
}
@@ -774,6 +810,10 @@ float CWindow::alphaTotal() const {
return m_alpha.getTotal();
}
+float CWindow::alphaTotalGoal() const {
+ return m_alpha.getTotalGoal();
+}
+
float CWindow::alphaTotalWithout(eWindowAlpha type) const {
return m_alpha.getTotalWithout(type);
}
@@ -786,6 +826,14 @@ bool CWindow::visibleByAlpha() const {
return effectiveAlpha() != 0.F;
}
+bool CWindow::visibleByAlphaGoal() const {
+ return alphaTotalGoal() != 0.F;
+}
+
+bool CWindow::targetVisible() const {
+ return !m_hidden && ((m_isMapped && m_wlSurface && m_wlSurface->resource()) || m_fadingOut) && visibleByAlphaGoal();
+}
+
// check if the point is "hidden" under a rounded corner of the window
// it is assumed that the point is within the real window box (m_vRealPosition, m_vRealSize)
// otherwise behaviour is undefined
@@ -1040,7 +1088,7 @@ bool CWindow::clampWindowSize(const std::optional<Vector2D> minSize, const std::
return changed;
}
-bool CWindow::isFullscreen() {
+bool CWindow::isFullscreen() const {
return m_fullscreenState.internal != FSMODE_NONE;
}
diff --git a/src/desktop/view/Window.hpp b/src/desktop/view/Window.hpp
index a5d89c58..32a7bcfe 100644
--- a/src/desktop/view/Window.hpp
+++ b/src/desktop/view/Window.hpp
@@ -315,15 +315,24 @@ namespace Desktop::View {
void setInputBlocked(eWindowInputBlockReason reason, bool blocked);
bool isInputBlocked() const;
bool isInputBlocked(eWindowInputBlockReason reason) const;
+ bool isInputBlockedOnly(eWindowInputBlockReason reason) const;
bool acceptsInput() const;
+ bool isAllowedOverFullscreen() const;
+ bool isBlockedByFullscreen() const;
+ bool isFadingOutUnderFullscreen() const;
+ bool shouldRenderOverFullscreen() const;
+ void updateFullscreenInputState();
PHLANIMVAR<float>& alpha(eWindowAlpha type);
const PHLANIMVAR<float>& alpha(eWindowAlpha type) const;
float alphaValue(eWindowAlpha type) const;
float alphaGoal(eWindowAlpha type) const;
float alphaTotal() const;
+ float alphaTotalGoal() const;
float alphaTotalWithout(eWindowAlpha type) const;
float effectiveAlpha() const;
bool visibleByAlpha() const;
+ bool visibleByAlphaGoal() const;
+ bool targetVisible() const;
void updateDecorationValues();
SBoxExtents getFullWindowReservedArea();
Vector2D middle();
@@ -339,7 +348,7 @@ namespace Desktop::View {
void activate(bool force = false);
int surfacesCount();
bool clampWindowSize(const std::optional<Vector2D> minSize, const std::optional<Vector2D> maxSize);
- bool isFullscreen();
+ bool isFullscreen() const;
bool isEffectiveInternalFSMode(const eFullscreenMode) const;
int getRealBorderSize() const;
float getScrollMouse();
diff --git a/src/helpers/Monitor.cpp b/src/helpers/Monitor.cpp
index 96d80bf3..657a8c11 100644
--- a/src/helpers/Monitor.cpp
+++ b/src/helpers/Monitor.cpp
@@ -1758,7 +1758,7 @@ uint32_t CMonitor::isSolitaryBlocked(bool full) {
if (w == PCANDIDATE || (!w->m_isMapped && !w->m_fadingOut) || !w->visible())
continue;
- if (w->workspaceID() == PCANDIDATE->workspaceID() && w->m_isFloating && w->m_createdOverFullscreen && w->visibleOnMonitor(m_self.lock())) {
+ if (w->workspaceID() == PCANDIDATE->workspaceID() && w->m_isFloating && w->isAllowedOverFullscreen() && w->visibleOnMonitor(m_self.lock())) {
reasons |= SC_FLOAT;
if (!full)
return reasons;
diff --git a/src/layout/LayoutManager.cpp b/src/layout/LayoutManager.cpp
index 82c59d0d..f90cedf6 100644
--- a/src/layout/LayoutManager.cpp
+++ b/src/layout/LayoutManager.cpp
@@ -217,7 +217,7 @@ void CLayoutManager::performSnap(Vector2D& sourcePos, Vector2D& sourceSize, SP<I
const double GAPSY = GAPSIN->m_top + GAPSIN->m_bottom;
for (auto& other : g_pCompositor->m_windows) {
- if ((HASFULLSCREEN && !other->m_createdOverFullscreen) || other == DRAGGINGWINDOW || other->workspaceID() != WSID || !other->m_isMapped || other->m_fadingOut ||
+ if ((HASFULLSCREEN && !other->isAllowedOverFullscreen()) || other == DRAGGINGWINDOW || other->workspaceID() != WSID || !other->m_isMapped || other->m_fadingOut ||
other->isX11OverrideRedirect())
continue;
diff --git a/src/layout/supplementary/DragController.cpp b/src/layout/supplementary/DragController.cpp
index 305e27ec..3def8596 100644
--- a/src/layout/supplementary/DragController.cpp
+++ b/src/layout/supplementary/DragController.cpp
@@ -48,7 +48,7 @@ bool CDragStateController::updateDragWindow() {
const auto PWORKSPACE = DRAGGINGTARGET->workspace();
const auto DRAGGINGWINDOW = DRAGGINGTARGET->window();
- if (PWORKSPACE->m_hasFullscreenWindow && (!DRAGGINGTARGET->floating() || (!DRAGGINGWINDOW->m_createdOverFullscreen && !DRAGGINGWINDOW->m_pinned))) {
+ if (PWORKSPACE->m_hasFullscreenWindow && (!DRAGGINGTARGET->floating() || !DRAGGINGWINDOW->isAllowedOverFullscreen())) {
Log::logger->log(Log::DEBUG, "Rejecting drag on a fullscreen workspace. (window under fullscreen)");
CKeybindManager::changeMouseBindMode(MBIND_INVALID);
return true;
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();
}
}
diff --git a/src/render/Renderer.cpp b/src/render/Renderer.cpp
index 48405c3d..b5a32a2b 100644
--- a/src/render/Renderer.cpp
+++ b/src/render/Renderer.cpp
@@ -245,7 +245,7 @@ bool IHyprRenderer::shouldRenderWindow(PHLWINDOW pWindow, PHLMONITOR pMonitor) {
return true;
// if hidden behind fullscreen
- if (PWINDOWWORKSPACE->m_hasFullscreenWindow && !pWindow->isFullscreen() && (!pWindow->m_isFloating || !pWindow->m_createdOverFullscreen) &&
+ if (PWINDOWWORKSPACE->m_hasFullscreenWindow && !pWindow->isAllowedOverFullscreen() &&
pWindow->alphaValue(WINDOW_ALPHA_FADE) * pWindow->alphaValue(WINDOW_ALPHA_FULLSCREEN) == 0)
return false;
@@ -358,6 +358,9 @@ void IHyprRenderer::renderWorkspaceWindowsFullscreen(PHLMONITOR pMonitor, PHLWOR
if (pWorkspace->m_isSpecialWorkspace && w->m_monitor != pWorkspace->m_monitor)
continue; // special on another are rendered as a part of the base pass
+ if (w->isFadingOutUnderFullscreen())
+ continue; // render these over fullscreen so the fade-out is visible
+
renderWindow(w, pMonitor, time, true, RENDER_PASS_ALL);
}
@@ -396,8 +399,8 @@ void IHyprRenderer::renderWorkspaceWindowsFullscreen(PHLMONITOR pMonitor, PHLWOR
// then render windows over fullscreen.
for (auto const& w : g_pCompositor->m_windows) {
- const bool shouldSkipWindow = w->workspaceID() != pWorkspaceWindow->workspaceID() || !w->m_isFloating || (!w->m_createdOverFullscreen && !w->m_pinned) ||
- (!w->m_isMapped && !w->m_fadingOut) || w->isFullscreen();
+ const bool shouldSkipWindow =
+ w->workspaceID() != pWorkspaceWindow->workspaceID() || !w->m_isFloating || !w->shouldRenderOverFullscreen() || (!w->m_isMapped && !w->m_fadingOut) || w->isFullscreen();
if (shouldSkipWindow)
continue;