fix: don't fold non-native fullscreen self-resizes into the layout#415
Open
KorigamiK wants to merge 1 commit into
Open
fix: don't fold non-native fullscreen self-resizes into the layout#415KorigamiK wants to merge 1 commit into
KorigamiK wants to merge 1 commit into
Conversation
Apps implementing fullscreen without macOS native fullscreen resize their own window over the whole screen with no mouse involved. Treating that as a user resize rewrites split ratios and wrecks the workspace arrangement, and the damage doesn't invert when the app restores its frame. Following AeroSpace's model, ignore programmatic screen-covering resizes entirely and re-assert the stored layout when the window shrinks back.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Apps that implement fullscreen without macOS native fullscreen (e.g. Firefox with
full-screen-api.macos-native-full-screen=false) resize their own window over the whole screen with no mouse involved.handle_window_frame_changedtreats that as a user resize and emitsLayoutEvent::WindowResized, which rewrites the split ratios around the window — wrecking the workspace arrangement (a BSP tree collapses into everything horizontally tiled). The damage doesn't invert when the app restores its frame on exit.Fix
Following AeroSpace's model for non-native fullscreen: in the non-drag, same-space resize path, detect frames that cover a screen (within a ±1–2px tolerance):
WindowResized).Testing
cargo test: 403 passed, 1 failed — the failure (topology_change_clears_stale_pending_hide_target_before_next_workspace_layout) is pre-existing and also fails on cleanmainat 72494bf.