Skip to content

fix: use hasFullscreen() in workspace swipe gesture for scrolling layout compatibility - #14736

Closed
AuthenticSm1les wants to merge 1 commit into
hyprwm:mainfrom
AuthenticSm1les:fix/swipe-gesture-fullscreen-alpha
Closed

AuthenticSm1les wants to merge 1 commit into
hyprwm:mainfrom
AuthenticSm1les:fix/swipe-gesture-fullscreen-alpha

Conversation

@AuthenticSm1les

@AuthenticSm1les AuthenticSm1les commented May 21, 2026 •

Copy link
Copy Markdown

Description

When using scrolling layout (tiledLayout: scrolling) with a TOP-layer bar (e.g. Waybar configured with "layer": "top"), the bar becomes visible on workspace switch via touchpad swipe gesture even when the target workspace has a fullscreen window.

Root Cause

The workspace swipe gesture code in UnifiedWorkspaceSwipeGesture.cpp uses m_hasFullscreenWindow directly to determine layer-surface alpha. In scrolling layout, the layout algorithm handles fullscreen requests (LAYOUT_HANDLED_FULLSCREEN), causing setWindowFullscreenState() in Compositor.cpp to reset m_hasFullscreenWindow = false and m_fullscreenMode = FSMODE_NONE.

Since the swipe gesture checks m_hasFullscreenWindow (which is false) instead of hasFullscreen() (which also checks layoutFullscreenCoversMonitor()), the bar alpha is always set to 1.0 (fully visible) even when the target workspace has a fullscreen window that covers the entire monitor.

Changes

Two lines in src/managers/input/UnifiedWorkspaceSwipeGesture.cpp:

  1. begin() β€” Replace PWORKSPACE->m_hasFullscreenWindow with PWORKSPACE->hasFullscreen() so that layout-handled fullscreen is correctly detected when starting a swipe.

  2. end() β€” Replace pSwitchedTo->m_hasFullscreenWindow && pSwitchedTo->m_fullscreenMode == FSMODE_FULLSCREEN with pSwitchedTo->hasFullscreen() && pSwitchedTo->m_fullscreenMode != FSMODE_MAXIMIZED to match the semantics of setFullscreenFadeAnimation() in DesktopAnimationManager.cpp (which also uses ws->m_fullscreenMode != FSMODE_MAXIMIZED).

AI-Generated Note

This PR was generated by an AI assistant and should be used as a reference/template for producing a proper fix. The analysis and root cause identification are accurate, but the implementation has not been tested end-to-end and should not be merged as-is. Please review and validate before any merge.

Related

PR #14425 introduced hasFullscreen() but only updated Monitor.cpp call sites. The swipe gesture code was missed.

@github-actions

Copy link
Copy Markdown

Hello and thank you for making a PR to Hyprland!

Please check the PR Guidelines and make sure your PR follows them.
It will make the entire review process faster. :)

If your code can be tested, please always add tests. See more here.

beep boop, I'm just a bot. A real human will review your PR soon.

@AuthenticSm1les

Copy link
Copy Markdown
Author

Note: This PR was generated by an AI assistant and should be used as a reference/template for producing a proper fix. It has not been tested end-to-end and should not be merged as-is. The analysis and root cause identification are accurate, but the implementation should be reviewed and validated by a human maintainer before any merge.

@laiviettrung

Copy link
Copy Markdown

I have same issue with this

@erstarr

erstarr commented May 29, 2026 •

Copy link
Copy Markdown
Member

This should be fixed with #14705. I've tried to unify all FS checks to also handle layout handled fullscreens (i.e. scrolling) so that should take care of your problem. Please help test when it's done.

@AuthenticSm1les AuthenticSm1les closed this by deleting the head repository Jun 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants