Skip to content

float: defer size calculation if initially on dummy output - #1148

Merged
mahkoh merged 4 commits into
masterfrom
jorth/intial-float-size
Aug 1, 2026
Merged

float: defer size calculation if initially on dummy output#1148
mahkoh merged 4 commits into
masterfrom
jorth/intial-float-size

Conversation

@mahkoh

@mahkoh mahkoh commented Aug 1, 2026

Copy link
Copy Markdown
Owner

Fixes #1145

Copilot AI review requested due to automatic review settings August 1, 2026 12:45

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR addresses issue #1145 where floating windows can end up with a 0x0 geometry (invisible) after being moved into an overlay workspace, by deferring/redoing initial float positioning when the workspace/output state transitions away from a dummy output.

Changes:

  • Track whether a workspace has been on a dummy output and, on the next real extents update, reposition floats that still need an initial size/position.
  • Move initial float position computation into FloatNode::new, including a dummy-output fallback and a shared calculate_float_position helper.
  • Add a FloatNode::set_position helper and update call sites/tests to use it.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/tree/workspace.rs Tracks “was on dummy output” and triggers float repositioning when transitioning to a real output.
src/tree/float.rs Defers initial float sizing/positioning when created on a dummy output; adds set_position; introduces calculate_float_position.
src/state.rs Updates float creation to pass inner dimensions/abs position into FloatNode::new (position computed inside FloatNode).
src/it/tests/t0033_float_size_memoization.rs Updates test to use set_position (but currently contains a coordinate bug needing correction).
src/it/tests/t0028_top_level_restacking.rs Updates test to use set_position.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/it/tests/t0033_float_size_memoization.rs
@mahkoh
mahkoh merged commit b4ed2e0 into master Aug 1, 2026
14 checks passed
@mahkoh
mahkoh deleted the jorth/intial-float-size branch August 1, 2026 12:52
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.

Floating window gets size 0x0 (invisible) when moved to an overlay workspace

2 participants