Repository navigation
fix: stop the edit bar crashing when a widget comes back on another display - #637
Conversation
…isplay The edit bar drew a widget it hadn't measured yet at a scale of 0. Each tile hosts an NSHostingView, and AppKit aborts laying one out at a scale it can't invert. With two displays, a drop on one brought the widget back unmeasured on the other. It now grows in from a scale of 0.01. Fixes #636
|
No actionable comments were generated in the recent review. Walkthrough
Severity of issue fixed: Medium Merge Risk:
|
Before and after
150 unchanged screens
Visual review: 150 screens, none changed. |
|
🎉 This PR is included in version 0.15.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Problem
With two displays, StableBar aborts while editing the bar in place: a drop on one display's edit bar crashes the other one a moment later (
Assertion failed: (determinant != 0), function NSCGSizeApplyInverseAffineTransform). Fixes #636.Changes
BarEditViewdrew a unit it hadn't measured yet at.scaleEffect(0)so it grows in from nothing. Each tile is aBarEditDragSourceholding anNSHostingView, and AppKit aborts laying out that hosting view at a scale it can't invert. While a widget is over one display, the other display's edit bar leaves it out and forgets its width, so after the drop it comes back unmeasured at a scale of 0.Testing
aWidgetDroppedOnOneDisplayComesBackOnTheOtherDisplaysEditBaredits the bar on two displays, drags a widget over the first and drops it there. Onmainit aborts the test run with the same assertion as the crash report; with the fix it passes, three runs in a row, also withLIBDISPATCH_COOPERATIVE_POOL_STRICT=1.BarEditViewTestsand the other edit bar tests pass;scripts/check.sh --quickpasses.NSHostingViewin anNSViewRepresentable) aborts at a scale of 0 and runs at 0.01, both when a tile appears and when an existing tile's scale drops.Merging
One commit: squash or rebase.
Claude Opus 5.5 via Claude Code