Skip to content

Avoid redundant Accessibility writes during ordinary window placement - #1899

Merged
rxhanson merged 1 commit into
rxhanson:mainfrom
kiteretsu903:fix/review-window-placement
Oct 9, 2026
Merged

rxhanson merged 1 commit into
rxhanson:mainfrom
kiteretsu903:fix/review-window-placement

Conversation

@kiteretsu903

@kiteretsu903 kiteretsu903 commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

This reduces flicker and visible intermediate jumps when switching a window between layouts with window animation disabled. For example, moving between left and right halves should not needlessly resize a window that already has the correct dimensions. When a resize is needed, the order of movement and resizing can also cause the window to briefly appear at an intermediate position before being corrected near a screen edge.

The change skips redundant Accessibility size writes and uses the starting and destination geometry to choose whether to move or resize first. The aim is fewer visible intermediate states during ordinary placement; it does not add an animation or delay placement to hide them.

Behavior and scope

  • Size-changing operations choose whether to resize or move first, while retaining corrective placement when an application changes or rejects the requested size.
  • Fixed-size windows are positioned using their actual size. Screen boundaries, configured gaps, and shared display edges remain part of the placement calculation.
  • A target-size change is treated as a resize even when the action is not normally classified as a resizing action.

There is no new setting. ImmediateWindowPlacement describes final placement geometry without depending on animation state or interpolation types. This PR can be reviewed independently of the animation change; it does not alter snap detection or introduce new layout features.

Validation

The full branch XCTest suite passed (524 tests, including existing tests). The standalone Release build passed 10 real-window checks covering ordinary and animated placement, maximize/restore, rapid retargeting, and drag release.

A dedicated native sweep of fixed-size applications, oversized windows, and physical display/Dock arrangements remains pending. Those cases should be reviewed separately from the automated geometry coverage.

@kiteretsu903
kiteretsu903 force-pushed the fix/review-window-placement branch from cd856ae to e437813 Compare October 9, 2026 02:50
@rxhanson

rxhanson commented Oct 9, 2026

Copy link
Copy Markdown
Owner

This is good; something I had actually been planning on doing for a while but never got around to. I was trying to think of a better term than "Immediate" here, but couldn't think of one.

@rxhanson
rxhanson merged commit 810ee5b into rxhanson:main Oct 9, 2026
1 check passed
@kiteretsu903
kiteretsu903 deleted the fix/review-window-placement branch October 13, 2026 03:47
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.

2 participants