summaryrefslogtreecommitdiffstats
path: root/native
diff options
context:
space:
mode:
authorLibravatar Michael Aaron Murphy <mmstick@pm.me>2022-10-11 15:24:26 +0200
committerLibravatar Michael Aaron Murphy <mmstick@pm.me>2022-10-11 21:56:45 +0200
commitac6e137be3e9d2d2a1d8c1284880096a0e2c2a47 (patch)
tree3866764f7956c06a68367edd3111b0261602d906 /native
parent8a50836ffc32a6d9157eb18740b3947c4dbd7d1f (diff)
downloadiced-ac6e137be3e9d2d2a1d8c1284880096a0e2c2a47.tar.gz
iced-ac6e137be3e9d2d2a1d8c1284880096a0e2c2a47.tar.bz2
iced-ac6e137be3e9d2d2a1d8c1284880096a0e2c2a47.zip
feat: Add window minimize support
Diffstat (limited to 'native')
-rw-r--r--native/src/window/action.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/native/src/window/action.rs b/native/src/window/action.rs
index c49fdf9d..009dcc27 100644
--- a/native/src/window/action.rs
+++ b/native/src/window/action.rs
@@ -20,6 +20,8 @@ pub enum Action<T> {
},
/// Sets the window to maximized or back
Maximize(bool),
+ /// Set the window to minimized or back
+ Minimize(bool),
/// Move the window.
///
/// Unsupported on Wayland.
@@ -50,6 +52,7 @@ impl<T> Action<T> {
Self::Drag => Action::Drag,
Self::Resize { width, height } => Action::Resize { width, height },
Self::Maximize(bool) => Action::Maximize(bool),
+ Self::Minimize(bool) => Action::Minimize(bool),
Self::Move { x, y } => Action::Move { x, y },
Self::SetMode(mode) => Action::SetMode(mode),
Self::ToggleMaximize => Action::ToggleMaximize,
@@ -68,6 +71,7 @@ impl<T> fmt::Debug for Action<T> {
width, height
),
Self::Maximize(value) => write!(f, "Action::Maximize({})", value),
+ Self::Minimize(value) => write!(f, "Action::Minimize({}", value),
Self::Move { x, y } => {
write!(f, "Action::Move {{ x: {}, y: {} }}", x, y)
}