Skip to content

Animate from window frame#25

Closed
peterp wants to merge 5 commits into
peterp:mainfrom
ericclemmons:animate-from-window-frame
Closed

Animate from window frame#25
peterp wants to merge 5 commits into
peterp:mainfrom
ericclemmons:animate-from-window-frame

Conversation

@peterp
Copy link
Copy Markdown
Owner

@peterp peterp commented May 26, 2026

No description provided.

ericclemmons and others added 5 commits May 24, 2026 12:30
The show/pick animations previously started or ended at the overlay's
full bounds, so every tile flew in or out from the same big rectangle
regardless of where the underlying window actually sat. Convert each
tile's CGWindowList frame (top-left, global) into overlay content-view
coordinates and use that as the source/target frame, so tiles fly to
and from where their windows really live.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Show and dismiss now fly *all* tiles between their grid cells and the
real window frames they snapshot, not just the focused one. The backdrop
moves to its own CALayer so it can fade independently of the tiles, and
both fades run in parallel with the tile movement at the same duration.
Each tile's zPosition mirrors the WindowServer stacking order so
overlapping tiles maintain the same overlap as the live windows at the
start of show and end of dismiss. Easing switched to a symmetric
ease-in-out so the slide feels even on both ends.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Calling raiseAXWindow and app.activate up front let WindowServer reorder
the real windows behind the dim backdrop before the tile animation even
started, which read as a flash. Move both calls into the dismiss
transaction's completion block, with a small pause on either side: one
so the slide reads as "done" before any real-window movement, and one to
let WindowServer apply the reorder before the overlay disappears.
setCompletionBlock fires after the actual last rendered frame instead of
guessing from a delay.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The system paints a drop shadow on the real window the moment
activation runs. Without one on the tile, you see the shadow pop in
outside the tile's edges as the overlay disappears. Animate a matching
shadow onto the picked tile during the dismiss so the handoff is
seamless.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Letter-prefix typing dims non-matching tiles to 0.3 via applyTileLabels.
When the final character resolved a unique match and triggered pick(),
those dimmed tiles flew back to their source frames still at 0.3, so the
animation looked ghostly compared to clicking. Snap every tile's opacity
back to 1 at the start of pick() so the dismiss looks identical in both
paths.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@peterp
Copy link
Copy Markdown
Owner Author

peterp commented May 26, 2026

I added the missing changeset in 9307dd7 on branch animate-from-window-frame-with-changeset:\n\nmd\n---\nbump: patch\n---\n\nAnimate overlay tiles between their grid positions and each window's real screen frame for smoother show and dismiss transitions.\n\n\nI couldn't push it directly to this PR because maintainer edits are disabled on the fork branch.

@peterp
Copy link
Copy Markdown
Owner Author

peterp commented May 26, 2026

I added the animation speed config on top of this PR in peterp:animate-from-window-frame-with-changeset at 82e73c4.\n\nThis adds:\n- animationSpeed in config (0.25×–4×, default 1×)\n- a Settings slider\n- speed scaling for show, pick/dismiss, hide, reorder layout, and peek animations\n- README docs and a changeset\n\nI still can't push directly to ericclemmons:animate-from-window-frame because maintainer edits are disabled on the fork branch.

@peterp
Copy link
Copy Markdown
Owner Author

peterp commented May 26, 2026

Opened #26 as an updateable replacement with this PR's animation work plus the new animation speed setting, since this fork branch has maintainer edits disabled.

@peterp
Copy link
Copy Markdown
Owner Author

peterp commented May 26, 2026

Closing in favor of #26, which includes this animation work, the changesets, and the animation speed setting. #26 has been merged.

@peterp peterp closed this May 26, 2026
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