From 9f75f01ddb7a13a3ab1cffdfa59997cb5b131f72 Mon Sep 17 00:00:00 2001 From: Night_Hunter Date: Sat, 10 Dec 2022 01:54:57 +1300 Subject: add action to get window id --- native/src/window/action.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'native/src') diff --git a/native/src/window/action.rs b/native/src/window/action.rs index c6361449..ce36d129 100644 --- a/native/src/window/action.rs +++ b/native/src/window/action.rs @@ -76,6 +76,8 @@ pub enum Action { /// /// - **Web / Wayland:** Unsupported. ChangeAlwaysOnTop(bool), + /// Fetch an identifier unique to the window. + FetchId(Box T + 'static>), } impl Action { @@ -105,6 +107,7 @@ impl Action { Self::ChangeAlwaysOnTop(on_top) => { Action::ChangeAlwaysOnTop(on_top) } + Self::FetchId(o) => Action::FetchId(Box::new(move |s| f(o(s)))), } } } @@ -138,6 +141,7 @@ impl fmt::Debug for Action { Self::ChangeAlwaysOnTop(on_top) => { write!(f, "Action::AlwaysOnTop({on_top})") } + Self::FetchId(_) => write!(f, "Action::FetchId"), } } } -- cgit