From 12df8b6c0c1129a5e3dd41116dfaa10c0ce30e2f Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Wed, 23 Nov 2022 15:23:06 +0100 Subject: [PATCH] macOS: Fix ApplicationDelegate::init (#2566) --- src/platform_impl/macos/app_delegate.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/platform_impl/macos/app_delegate.rs b/src/platform_impl/macos/app_delegate.rs index 11c8d2e7..0c9eff17 100644 --- a/src/platform_impl/macos/app_delegate.rs +++ b/src/platform_impl/macos/app_delegate.rs @@ -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 }) }