Skip to content

fix(wm): don't tile user-minimized windows in the startup layout - #1834

Merged
eythaann merged 1 commit into
eythaann:masterfrom
z1pp090:fix/wm-startup-minimized
Sep 19, 2026
Merged

eythaann merged 1 commit into
eythaann:masterfrom
z1pp090:fix/wm-startup-minimized

Conversation

@z1pp090

@z1pp090 z1pp090 commented Sep 19, 2026 •

Copy link
Copy Markdown
Contributor

Symptom

After Seelen UI (re)starts with some windows minimized, the tiling overlay shows empty tiles with their border drawn on the desktop: the layout reserves a slot for each minimized window. It stays like that until something forces a re-render (moving a window, toggling the window manager).

Reproduces every time: minimize a tiled window, restart Seelen UI.

Cause

TwmState::initialize adds every window of every persisted workspace to the tree with should_be_managed_ignoring_minimized. That is right for inactive workspaces (the virtual desktop manager hides their windows by minimizing them, and they must keep their slot), but on the active workspace a minimized window was minimized by the user, and it gets a slot anyway.

Fix

Use the minimized-aware should_be_managed for the active workspace of each monitor and keep the lenient check for the inactive ones.

Tested

Debug build on Windows 11, two monitors: minimized Spotify, restarted Seelen; the remaining windows fill the layout and there is no empty tile. cargo test, clippy and rustfmt clean.

🤖 Generated with Claude Code

`TwmState::initialize` added every window of every workspace to the
tree ignoring its minimized state, because windows on inactive
workspaces are minimized by the virtual desktop manager to hide them
and must keep their slot. On the active workspace, however, a minimized
window was minimized by the user, and giving it a slot leaves an empty
tile (with its border drawn by the overlay) on screen after every
Seelen restart until something forces a re-render.

Use the minimized-aware check for the active workspace of each monitor
and keep the lenient one for the inactive ones.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01StkifHpSLWH4J5TvuP56ur
@greptile-apps

greptile-apps Bot commented Sep 19, 2026

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 4/5

The implementation appears behaviorally sound, but the repository’s explicit testing requirement should be satisfied before merging.

Summary

This PR makes startup layout initialization use minimized-aware filtering on each monitor's active workspace while retaining minimized-agnostic filtering for inactive workspaces.

  • Prevents user-minimized windows from reserving empty tiles after restart.
  • Preserves layout slots for windows minimized to hide inactive workspaces.
  • The runtime event path re-adds an excluded window when the user restores it.
  • A regression test is still required for the changed behavior.

Reviews (1) · Last reviewed commit: "fix(wm): don't tile user-minimized windo..."

Comment thread src/background/widgets/window_manager/state_v2.rs
@malashkadev

Copy link
Copy Markdown
Contributor

I confirm, I constantly encounter this problem.

@eythaann
eythaann merged commit 3605b84 into eythaann:master Sep 19, 2026
5 checks passed
@z1pp090
z1pp090 deleted the fix/wm-startup-minimized branch September 24, 2026 15:36
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.

3 participants