mirror of
https://github.com/italicsjenga/winit-sonoma-fix.git
synced 2024-12-23 22:01:31 +11:00
macOS: Fix ApplicationDelegate::init (#2566)
This commit is contained in:
parent
65baae75c4
commit
12df8b6c0c
|
@ -20,16 +20,18 @@ declare_class!(
|
|||
}
|
||||
|
||||
unsafe impl ApplicationDelegate {
|
||||
#[sel(initWithActivationPolicy:defaultMenu:)]
|
||||
#[sel(initWithActivationPolicy:defaultMenu:activateIgnoringOtherApps:)]
|
||||
fn init(
|
||||
&mut self,
|
||||
activation_policy: NSApplicationActivationPolicy,
|
||||
default_menu: bool,
|
||||
activate_ignoring_other_apps: bool,
|
||||
) -> Option<&mut Self> {
|
||||
let this: Option<&mut Self> = unsafe { msg_send![super(self), init] };
|
||||
this.map(|this| {
|
||||
*this.activation_policy = activation_policy;
|
||||
*this.default_menu = default_menu;
|
||||
*this.activate_ignoring_other_apps = activate_ignoring_other_apps;
|
||||
this
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue