Commit ff335a5
The previous attempt (a09b916) silenced viewWillTransitionToSize: during
background but then called updateCanvas: synchronously inside
cn1ApplicationWillEnterForeground. On iPad with UIScene, view.bounds can
still be in the snapshot orientation at that moment, so updateCanvas
republished the swapped dimensions through screenSizeChanged -- the same
behavior the issue reports as a transient wrong size between stop and
start.
This change combines two safeguards: it restores the next-runloop
deferral around the foreground updateCanvas call so UIKit has a tick to
settle the bounds, and it cross-checks the sampled size against the
windowScene's interfaceOrientation, swapping the dimensions when they
contradict it. The orientation is authoritative for what the user
actually sees, so this catches the failure even when the deferred call
still fires before UIKit has fully restored bounds.
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 25dbe3e commit ff335a5
2 files changed
Lines changed: 43 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
248 | 248 | | |
249 | 249 | | |
250 | 250 | | |
251 | | - | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
252 | 261 | | |
253 | 262 | | |
254 | 263 | | |
| |||
Lines changed: 33 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
167 | 167 | | |
168 | 168 | | |
169 | 169 | | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
170 | 197 | | |
171 | 198 | | |
172 | 199 | | |
| |||
2020 | 2047 | | |
2021 | 2048 | | |
2022 | 2049 | | |
2023 | | - | |
| 2050 | + | |
2024 | 2051 | | |
2025 | 2052 | | |
2026 | | - | |
| 2053 | + | |
2027 | 2054 | | |
2028 | 2055 | | |
2029 | 2056 | | |
2030 | 2057 | | |
2031 | 2058 | | |
2032 | 2059 | | |
2033 | | - | |
2034 | | - | |
2035 | | - | |
| 2060 | + | |
| 2061 | + | |
| 2062 | + | |
2036 | 2063 | | |
2037 | 2064 | | |
2038 | | - | |
| 2065 | + | |
2039 | 2066 | | |
2040 | 2067 | | |
2041 | 2068 | | |
| |||
0 commit comments