Fix stutter when expanding and hiding custom notch#45
Open
GedeonIsezerano wants to merge 4 commits intoMrKai77:mainfrom
Open
Fix stutter when expanding and hiding custom notch#45GedeonIsezerano wants to merge 4 commits intoMrKai77:mainfrom
GedeonIsezerano wants to merge 4 commits intoMrKai77:mainfrom
Conversation
When expanding from hidden state, the window would briefly show an intermediate frame before the animation started, causing a visual "stutter" or "false start" appearance. The fix has two parts: 1. Decouple window creation from display by adding an `orderFront` parameter to `initializeWindow()`. This allows creating the window and setting up the SwiftUI view hierarchy without immediately showing it. 2. In `showWindow()`, start with `alphaValue = 0` and fade in over 0.15s. This masks any initial frame glitches that occur when AppKit/SwiftUI first renders the window. 3. Update `_expand()` and `_compact()` to: - Create window without showing it - Start the state animation - Then show window with fade-in This ensures smooth, stutter-free animations when the notch first appears.
Fix expand/compact animation stutter on initial appearance
Add fade-out before closing window to mask any visual glitches during the closing animation. - Reduced initial wait from 0.4s to 0.25s - Added fadeOutWindow() that fades alpha to 0 over 0.15s - Window now smoothly disappears instead of abruptly closing
Fix hide animation stutter
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.
Screen.Recording.2026-01-04.at.10.53.07.PM.mov
So, when expanding the dynamic notch, there is always a stutter that looks like it's trying to expand, and then it freezes and then fully expands. Something happens when it's collapsing. After it collapses, it looks like there's a stutter that seems as if it's not closing exactly, and then it fully closes.