From 750fecd6bca293fa891fbdfbf6c7052c49e3fd12 Mon Sep 17 00:00:00 2001 From: Night_Hunter Date: Sat, 10 Dec 2022 01:40:53 +1300 Subject: add toggle decorations action --- native/src/window/action.rs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'native/src/window/action.rs') diff --git a/native/src/window/action.rs b/native/src/window/action.rs index 009dcc27..f731be19 100644 --- a/native/src/window/action.rs +++ b/native/src/window/action.rs @@ -35,6 +35,11 @@ pub enum Action { SetMode(Mode), /// Sets the window to maximized or back ToggleMaximize, + /// Toggles whether window has decorations + /// ## Platform-specific + /// - **X11:** Not implemented. + /// - **iOS / Android / Web:** Unsupported. + ToggleDecorations, /// Fetch the current [`Mode`] of the window. FetchMode(Box T + 'static>), } @@ -56,6 +61,7 @@ impl Action { Self::Move { x, y } => Action::Move { x, y }, Self::SetMode(mode) => Action::SetMode(mode), Self::ToggleMaximize => Action::ToggleMaximize, + Self::ToggleDecorations => Action::ToggleDecorations, Self::FetchMode(o) => Action::FetchMode(Box::new(move |s| f(o(s)))), } } @@ -77,6 +83,7 @@ impl fmt::Debug for Action { } Self::SetMode(mode) => write!(f, "Action::SetMode({:?})", mode), Self::ToggleMaximize => write!(f, "Action::ToggleMaximize"), + Self::ToggleDecorations => write!(f, "Action::ToggleDecorations"), Self::FetchMode(_) => write!(f, "Action::FetchMode"), } } -- cgit