Commit 2294750
Start the panel slide after the window is on screen (#24)
The reveal animation ran on the content inside a fixed panel frame, but it
was started in the same turn as `orderFrontRegardless()`. Ordering a window
in is not instant: the window server needs a composited frame first.
Measured on a real launch, that gap is 47-62ms (six samples, mean 53ms).
The slide is a 250ms easeOut, so those ~50ms are 20% of the duration and,
on that curve, about 36% of the distance. The panel therefore materialised
already a third of the way up and read as a pop rather than a slide.
`hidePanel` was unaffected because its window is already on screen when it
animates, which is why closing looked right and opening did not.
Push the parked first frame out with `displayIfNeeded()` + a CATransaction
flush, then start the slide on the next main actor turn so the whole curve
happens on screen. Also drop the window shadow before ordering in, so the
first composited frame never carries a shadow around empty space.
Costs ~50ms before the content starts moving. Total hotkey-to-open is about
310ms, still well below the 168ms build cost this path had before #18.
Co-authored-by: mobrava <82764703+mobrava@users.noreply.github.com>1 parent c3871e5 commit 2294750
1 file changed
Lines changed: 27 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | 114 | | |
118 | 115 | | |
119 | 116 | | |
120 | 117 | | |
121 | 118 | | |
122 | 119 | | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
127 | 140 | | |
128 | 141 | | |
129 | 142 | | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
137 | 150 | | |
138 | 151 | | |
139 | 152 | | |
| |||
0 commit comments