On macOS, add EventLoopBuilderExtMacOS::with_activate_ignoring_other_apps (#2551)
* On macOS, add `EventLoopBuilderExtMacOS::with_activate_ignoring_other_apps` * Update src/platform/macos.rs Co-authored-by: Mads Marquart <mads@marquart.dk> * remove todo Co-authored-by: Mads Marquart <mads@marquart.dk>
This commit is contained in:
parent
ce6c6e8c95
commit
418cc44e93
5 changed files with 34 additions and 5 deletions
|
|
@ -272,7 +272,11 @@ impl AppState {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn launched(activation_policy: NSApplicationActivationPolicy, create_default_menu: bool) {
|
||||
pub fn launched(
|
||||
activation_policy: NSApplicationActivationPolicy,
|
||||
create_default_menu: bool,
|
||||
activate_ignoring_other_apps: bool,
|
||||
) {
|
||||
let app = NSApp();
|
||||
// We need to delay setting the activation policy and activating the app
|
||||
// until `applicationDidFinishLaunching` has been called. Otherwise the
|
||||
|
|
@ -280,8 +284,7 @@ impl AppState {
|
|||
app.setActivationPolicy(activation_policy);
|
||||
|
||||
window_activation_hack(&app);
|
||||
// TODO: Consider allowing the user to specify they don't want their application activated
|
||||
app.activateIgnoringOtherApps(true);
|
||||
app.activateIgnoringOtherApps(activate_ignoring_other_apps);
|
||||
|
||||
HANDLER.set_ready();
|
||||
HANDLER.waker().start();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue