Skip to content

Commit

Permalink
Hide app item on macOS dock
Browse files Browse the repository at this point in the history
  • Loading branch information
Exidex committed Jun 9, 2024
1 parent d228ed6 commit 713cb0e
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion winit/src/application.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,20 @@ where
let mut debug = Debug::new();
debug.startup_started();

let event_loop = EventLoopBuilder::with_user_event()
let mut event_loop_builder = EventLoopBuilder::with_user_event();

Check failure on line 118 in winit/src/application.rs

View workflow job for this annotation

GitHub Actions / all

Diff in /home/runner/work/iced/iced/winit/src/application.rs

#[cfg(target_os = "macos")]
use winit::platform::macos::{EventLoopBuilderExtMacOS, ActivationPolicy};

#[cfg(target_os = "macos")]
let event_loop_builder = event_loop_builder
.with_activation_policy(ActivationPolicy::Accessory) // hide app icon from macos dock

Check failure on line 125 in winit/src/application.rs

View workflow job for this annotation

GitHub Actions / all

Diff in /home/runner/work/iced/iced/winit/src/application.rs
.with_activate_ignoring_other_apps(false); // when used with ActivationPolicy::Accessory, fixes issue when windows is not focused when opened

let event_loop = event_loop_builder
.build()
.expect("Create event loop");

let proxy = event_loop.create_proxy();

let runtime = {
Expand Down

0 comments on commit 713cb0e

Please sign in to comment.