Skip to content

Add optional snapping animations and a blurred snap preview - #1849

Open
kiteretsu903 wants to merge 11 commits into
rxhanson:mainfrom
kiteretsu903:dev/animation
Open

Add optional snapping animations and a blurred snap preview#1849
kiteretsu903 wants to merge 11 commits into
rxhanson:mainfrom
kiteretsu903:dev/animation

Conversation

@kiteretsu903

Copy link
Copy Markdown

This adds two options in Snap Areas, both off by default: Animate windows (experimental) and Blur footprint.

Snapping and restoring use smooth transitions, and the existing footprint animation follows the same easing curve. The blurred preview adapts to light and dark mode, with a subtle outline and outer shadow. Its tint uses the existing color and alpha preferences, defaulting to zero.

Animation remains experimental because repeatedly updating size and position may cause issues in some edge cases. Animations respect Reduce Motion, and blur respects Reduce Transparency.

This also balances the checkbox layout and updates the permission wording for macOS 27.

Comment thread Rectangle/Defaults.swift Outdated
}
}

class FootprintAlphaDefault: Default {

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Rather than making a new default subclass, you'll want to use the DoubleDefault class, which allows an explicit zero.

@rxhanson

rxhanson commented Sep 7, 2026

Copy link
Copy Markdown
Owner

Thanks! This is great :)

Looks like a merge conflict arose from another PR that I merged. Let me know if you need help resolving it.

Also, if you don't mind, can you clean up some of the comments that are added in here, as it looks like some of them are more for train of thought understanding than necessary communication in the codebase?

@rxhanson

rxhanson commented Sep 7, 2026

Copy link
Copy Markdown
Owner

On this note, I've given this a lot of thought prior to the PR, and one of the ideas I had for mitigating the limitations from the Accessibility API is to overlay a blurred window owned by Rectangle, move the actual window off the screen via Accessibility, resize the blurred window with native animation, then place the window at its destination as the animation concludes. This has its own set of usability issues, and doesn't work great for windows that don't fit the destination rect, but it might be worth exploring. Figured I'd mention it if you feel inclined to explore that route as well - no worries if not.

Interpolate same-display resizing with a settling curve, preserve pending destinations for shortcut history, and let native dragging own position during size restoration. Respect Reduce Motion and keep existing mover fallbacks.
Use native blur with optional tint, a subtle outline, and an exterior shadow aligned at screen edges. Share the animation curve, respect reduced motion and transparency, and configure authored layers for SDR.
Add the two opt-in controls and their translations, and move haptic feedback into the left column.
Use Device Control and Data Access on macOS 27 and retain the earlier permission wording on older releases.
Only finish drag restoration on mouse-up when a window was actually being dragged. This prevents the drag monitor from prematurely settling a title-bar maximize or restore animation started by the same release event.

Document that title-bar double-click uses the existing snap animation setting. Release build passed; live event ordering has not been reproduced.
@kiteretsu903

kiteretsu903 commented Sep 8, 2026

Copy link
Copy Markdown
Author

@rxhanson Hi, Ryan, Thanks for quick response@
(1) fixed using DoubleDefault
(2) conflict resolved. Also improved the look of the "minimum window size reached" warning.
(3) improved comments
(4) For animation, I think your idea makes a lot of sense. I'll actually explore in that direction because I'm seeing some jumps on edge cases in my implementation. Will let you know once I have an update.
Thanks again for the helpful feedback!

Detect movement from current displayed bounds, preserve the original grab reference, and let restoration finish after mouse release. Add regression coverage and document the remaining far-right drag jumps.
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