Hyprland: Fullscreen Workspace Swipes
Fixing a bug in Wayland's most popular compositor
The Bug
When using the scrolling layout in Hyprland and using touchpad gestures to switch workspaces, the top layer (like Waybar) wouldn't disappear when moving into a fullscreen application. This broke the immersion of fullscreen apps and left the bar floating over content.
The Fix
The issue stemmed from the fullscreen checks relying on m_fullscreenMode and m_hasFullscreenWindow boolean state flags that were cached at the workspace level. During a swipe gesture, these flags could become desynced depending on the animation state.
I updated the codebase to determine the fullscreen state dynamically through getFullscreenWindow() rather than relying on the cached booleans. I also added an isDirection(char) overload and handled empty string views (sv.empty()) to make the layout engine more robust.
Impact
The pull request was merged into Hyprland's main branch, fixing #15053 and closing #14721. It was a great opportunity to dive into a modern C++ codebase and understand the intricacies of Wayland compositing and animation layers.