macOS/iOS: Remove window activation hacks (#3872)

No longer necessary after a8c7109 and facb809.
This commit is contained in:
Mads Marquart 2024-08-18 23:50:10 +02:00 committed by GitHub
parent a61e7bb4f4
commit 6c4da19197
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 18 additions and 113 deletions

View file

@ -558,6 +558,11 @@ fn new_window(
masks |= NSWindowStyleMask::FullSizeContentView;
}
// NOTE: This should only be created after the application has started launching,
// (`applicationWillFinishLaunching:` at the earliest), otherwise you'll run into very
// confusing issues with the window not being properly activated.
//
// Winit ensures this by not allowing access to `ActiveEventLoop` before handling events.
let window: Option<Retained<WinitWindow>> = unsafe {
msg_send_id![
super(mtm.alloc().set_ivars(())),