From d95b9bf244b5c1f7c8c3e84c1c05a5f81c9162e4 Mon Sep 17 00:00:00 2001 From: Night_Hunter Date: Sat, 10 Dec 2022 01:53:00 +1300 Subject: Add `RequestUserAttention` to `window::Action` --- native/src/window/user_attention.rs | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 native/src/window/user_attention.rs (limited to 'native/src/window/user_attention.rs') diff --git a/native/src/window/user_attention.rs b/native/src/window/user_attention.rs new file mode 100644 index 00000000..b03dfeef --- /dev/null +++ b/native/src/window/user_attention.rs @@ -0,0 +1,21 @@ +/// The type of user attention to request. +/// +/// ## Platform-specific +/// +/// - **X11:** Sets the WM's `XUrgencyHint`. No distinction between [`Critical`] and [`Informational`]. +/// +/// [`Critical`]: Self::Critical +/// [`Informational`]: Self::Informational +#[derive(Debug, Clone, Copy)] +pub enum UserAttention { + /// ## Platform-specific + /// + /// - **macOS:** Bounces the dock icon until the application is in focus. + /// - **Windows:** Flashes both the window and the taskbar button until the application is in focus. + Critical, + /// ## Platform-specific + /// + /// - **macOS:** Bounces the dock icon once. + /// - **Windows:** Flashes the taskbar button until the application is in focus. + Informational, +} -- cgit