summaryrefslogtreecommitdiffstats
path: root/winit/src/window.rs
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 /winit/src/window.rs
parent8a50836ffc32a6d9157eb18740b3947c4dbd7d1f (diff)
downloadiced-ac6e137be3e9d2d2a1d8c1284880096a0e2c2a47.tar.gz
iced-ac6e137be3e9d2d2a1d8c1284880096a0e2c2a47.tar.bz2
iced-ac6e137be3e9d2d2a1d8c1284880096a0e2c2a47.zip
feat: Add window minimize support
Diffstat (limited to 'winit/src/window.rs')
-rw-r--r--winit/src/window.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/winit/src/window.rs b/winit/src/window.rs
index 48210c33..1e704c5b 100644
--- a/winit/src/window.rs
+++ b/winit/src/window.rs
@@ -22,6 +22,11 @@ pub fn maximize<Message>(value: bool) -> Command<Message> {
Command::single(command::Action::Window(window::Action::Maximize(value)))
}
+/// Set the window to minimized or back.
+pub fn minimize<Message>(value: bool) -> Command<Message> {
+ Command::single(command::Action::Window(window::Action::Minimize(value)))
+}
+
/// Moves a window to the given logical coordinates.
pub fn move_to<Message>(x: i32, y: i32) -> Command<Message> {
Command::single(command::Action::Window(window::Action::Move { x, y }))