mirror of
https://github.com/rust-windowing/winit.git
synced 2026-09-01 06:10:07 -04:00
macOS: Fix ApplicationDelegate::init (#2566)
This commit is contained in:
@@ -20,16 +20,18 @@ declare_class!(
|
|||||||
}
|
}
|
||||||
|
|
||||||
unsafe impl ApplicationDelegate {
|
unsafe impl ApplicationDelegate {
|
||||||
#[sel(initWithActivationPolicy:defaultMenu:)]
|
#[sel(initWithActivationPolicy:defaultMenu:activateIgnoringOtherApps:)]
|
||||||
fn init(
|
fn init(
|
||||||
&mut self,
|
&mut self,
|
||||||
activation_policy: NSApplicationActivationPolicy,
|
activation_policy: NSApplicationActivationPolicy,
|
||||||
default_menu: bool,
|
default_menu: bool,
|
||||||
|
activate_ignoring_other_apps: bool,
|
||||||
) -> Option<&mut Self> {
|
) -> Option<&mut Self> {
|
||||||
let this: Option<&mut Self> = unsafe { msg_send![super(self), init] };
|
let this: Option<&mut Self> = unsafe { msg_send![super(self), init] };
|
||||||
this.map(|this| {
|
this.map(|this| {
|
||||||
*this.activation_policy = activation_policy;
|
*this.activation_policy = activation_policy;
|
||||||
*this.default_menu = default_menu;
|
*this.default_menu = default_menu;
|
||||||
|
*this.activate_ignoring_other_apps = activate_ignoring_other_apps;
|
||||||
this
|
this
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user