Allow preventing the creation of the default menu (#1923)

* Allow preventing the creation of the default menu

* Use more grammar friendly naming

* Update the changelog
This commit is contained in:
Artúr Kovács 2021-04-30 13:34:50 +02:00 committed by GitHub
parent cdeb1c3828
commit 0152508a39
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 26 additions and 4 deletions

View file

@ -17,6 +17,8 @@ pub struct AuxDelegateState {
/// after the app has finished launching. If the activation policy is set earlier, the
/// menubar is initially unresponsive on macOS 10.15 for example.
pub activation_policy: ActivationPolicy,
pub create_default_menu: bool,
}
pub struct AppDelegateClass(pub *const Class);
@ -56,6 +58,7 @@ extern "C" fn new(class: &Class, _: Sel) -> id {
AUX_DELEGATE_STATE_NAME,
Box::into_raw(Box::new(RefCell::new(AuxDelegateState {
activation_policy: ActivationPolicy::Regular,
create_default_menu: true,
}))) as *mut c_void,
);
this