Repository navigation
macOS: backport public window blur to 0.30.x - #4832
zoujiaqing wants to merge 2 commits into
Conversation
|
Another data point for this backport: a Mac App Store submission built with winit 0.30.12 (through eframe/egui 0.31, which is still on winit 0.30) was rejected this week by App Review's automated scan for Related: the undocumented |
elgeffe
left a comment
There was a problem hiding this comment.
Suggestion: since this targets a patch release, could the wrapper content view be created lazily, the first time blur is enabled? Right now every window gets the extra NSView as its contentView, even in apps that never blur. Winit itself handles that (the view ivar, rwh still points at WinitView), but outside code that reads window.contentView() and expects the winit view would see a change, e.g. accesskit_macos::SubclassingAdapter::for_window. Creating it on demand would keep the view hierarchy identical for everyone who doesn't use blur.
Summary
Backport the macOS window-blur fix from #4541 and 97fb66b to
v0.30.x. The default 0.30.13 build references private WindowServer symbols even if the application never enables blur. This can cause Mac App Store rejection under guideline 2.5.1.The default uses a public
NSVisualEffectViewbehind the rendering view. The existing raw window handle continues to point at that rendering view when blur is toggled. Theprivate-apple-apisfeature retains the previous fixed-radius blur for applications that explicitly opt in. This backport does not add the 0.31 material-selection API.Verification
cargo teston arm64 macOS: 37 passed, 4 doctests ignored.nm -ushows neither CGS import by default; the legacy feature build imports both.