Skip to content

Add default-off experimental window animations - #1848

Closed
kiteretsu903 wants to merge 2 commits into
rxhanson:mainfrom
kiteretsu903:dev/animation
Closed

Add default-off experimental window animations#1848
kiteretsu903 wants to merge 2 commits into
rxhanson:mainfrom
kiteretsu903:dev/animation

Conversation

@kiteretsu903

Copy link
Copy Markdown

Adds Animate windows (experimental) to Snap Areas preferences, off by default. When enabled, same-display window actions transition over 300 ms, and dragging a snapped window away restores its size over 180 ms. Keyboard Restore also uses the transition when the saved frame is on the same display.

Related to #1465.

The implementation interpolates position and size using elapsed time and a critically damped curve with a longer settling tail, with up to 60 updates per second through Accessibility. Missed ticks are skipped. Repeated shortcuts retarget from the displayed frame while retaining the logical destination for cycling and restore history. Existing window movers perform the final correction and readback. Refused AX writes end interpolation and fall back to that correction path.

The existing Enhanced UI policy spans the transition and is restored on completion or cancellation. Reduce Motion, VoiceOver, and Switch Control bypass animation. A manual grab finishes an in-progress transition even when drag-to-snap is disabled. The preference is included in configuration import/export, with English, Simplified Chinese, Traditional Chinese, and Japanese labels.

Initial scope: cross-display window actions, fixed-size window handling, cooperative corner adjustments, and bulk tiling/cascading retain their existing behavior. Target applications can still impose minimum sizes or respond slowly, so this remains experimental.

Validation:

  • Xcode 26.6 on macOS 27.0: Debug tests passed, 319 tests, zero failures.
  • Release build passed.
  • Added coverage for delayed ticks, cancellation and retargeting, failed writes, monotonic motion without overshoot, drag offsets, accessibility restoration, configuration export, and rapid-shortcut history preservation.
  • Live settings check: default off, checkbox layout, and persistence after restart verified.
  • Manual TextEdit check on macOS 27.0: snapping, keyboard Restore, and drag-to-restore confirmed smooth; the final curve was selected after comparison with an earlier timing curve.
  • Broader app/framework and older-macOS visual coverage remains to be gathered; no universal smoothness claim is intended.

@rxhanson

rxhanson commented Sep 7, 2026

Copy link
Copy Markdown
Owner

I've been thinking about adding this for a while, and I'm interested in merging this. Is there a reason that you have closed this pull request?

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