From 9cfb0f4a09f2da076d41c74b5507ba256da181e3 Mon Sep 17 00:00:00 2001 From: MrAntix Date: Sun, 21 Jan 2024 13:14:09 +0000 Subject: [PATCH] feat(window): adds skip_taskbar for windows --- core/src/window/settings/windows.rs | 4 ++++ winit/src/conversion.rs | 3 +++ 2 files changed, 7 insertions(+) diff --git a/core/src/window/settings/windows.rs b/core/src/window/settings/windows.rs index 45d753bdb6..d3bda25915 100644 --- a/core/src/window/settings/windows.rs +++ b/core/src/window/settings/windows.rs @@ -9,6 +9,9 @@ pub struct PlatformSpecific { /// Drag and drop support pub drag_and_drop: bool, + + /// Whether show or hide the window icon in the taskbar. + pub skip_taskbar: bool, } impl Default for PlatformSpecific { @@ -16,6 +19,7 @@ impl Default for PlatformSpecific { Self { parent: None, drag_and_drop: true, + skip_taskbar: false, } } } diff --git a/winit/src/conversion.rs b/winit/src/conversion.rs index 90a5d27f41..eceb160487 100644 --- a/winit/src/conversion.rs +++ b/winit/src/conversion.rs @@ -84,6 +84,9 @@ pub fn window_settings( } window_builder = window_builder .with_drag_and_drop(settings.platform_specific.drag_and_drop); + + window_builder = window_builder + .with_skip_taskbar(settings.platform_specific.skip_taskbar); } #[cfg(target_os = "macos")]