use winit::window::{Window, WindowAttributes};
pub fn skip_taskbar_attributes(attrs: WindowAttributes, skip: bool) -> WindowAttributes {
#[cfg(target_os = "windows")]
{
use winit::platform::windows::WindowAttributesExtWindows;
attrs.with_skip_taskbar(skip)
}
#[cfg(not(target_os = "windows"))]
{
let _ = skip;
attrs
}
}
pub fn skip_taskbar_before_show(window: &Window, skip: bool) {
#[cfg(all(unix, not(target_os = "macos")))]
if skip {
let Some(xid) = crate::window_system::x11_window_id(window) else {
return;
};
if let Err(err) = crate::x11::ewmh::mark_skip_taskbar(xid) {
eprintln!(
"teksilo-platform: could not keep the window out of the taskbar ({err}); \
it will be listed there"
);
}
}
#[cfg(not(all(unix, not(target_os = "macos"))))]
let _ = (window, skip);
}