Skip to content

fix(layout): make fullscreen only apply to focused window#352

Open
qeude wants to merge 1 commit intoacsandmann:mainfrom
qeude:fix/fullscreen-focus-away-bounds
Open

fix(layout): make fullscreen only apply to focused window#352
qeude wants to merge 1 commit intoacsandmann:mainfrom
qeude:fix/fullscreen-focus-away-bounds

Conversation

@qeude
Copy link
Copy Markdown

@qeude qeude commented May 5, 2026

Problem

Toggling fullscreen on a window and then cycling focus (e.g. via NextWindow / PrevWindow) would leave the unfocused fullscreen window covering the entire screen, causing it to stay in the background and obscure other tiled windows.

Solution

Fullscreen state (is_fullscreen / is_fullscreen_within_gaps) now persists on nodes, but layout calculation only applies screen/gap bounds when the node is in the focused selection path.

Changes

  • Traditional layout: apply_with_gaps checks is_focused before expanding to fullscreen rect
  • BSP layout: calculate_layout_recursive only fullscreens the selected leaf
  • Scrolling layout: calculate_layout only fullscreens the selected window
  • All systems: has_any_fullscreen_node only returns true when the fullscreen node is focused

Tests

Added unit tests for Traditional, BSP, and Scrolling layouts covering:

  • Unfocused fullscreen window returns to normal bounds
  • Refocused fullscreen window re-expands to screen bounds
  • fullscreen_within_gaps respects focus state

Previously, toggling fullscreen on a window and then cycling focus
would leave the unfocused fullscreen window covering the screen,
causing it to stay in the background and obscure other windows.

Fullscreen state now persists on nodes, but layout calculation only
applies screen bounds when the node is in the focused path. This
affects Traditional, BSP, and Scrolling layout systems.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant