Skip to content

Commit

Permalink
sctk: add command to set maximize state
Browse files Browse the repository at this point in the history
  • Loading branch information
jackpot51 committed Feb 12, 2024
1 parent ba4731f commit 01fe646
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions sctk/src/commands/window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,18 @@ pub fn start_drag_window<Message>(id: window::Id) -> Command<Message> {
))
}

pub fn maximize<Message>(id: window::Id, maximized: bool) -> Command<Message> {
Command::single(command::Action::PlatformSpecific(
platform_specific::Action::Wayland(wayland::Action::Window(
if maximized {
wayland::window::Action::Maximize { id }

Check failure on line 62 in sctk/src/commands/window.rs

View workflow job for this annotation

GitHub Actions / all

Diff in /home/runner/work/iced/iced/sctk/src/commands/window.rs
} else {
wayland::window::Action::UnsetMaximize { id }
}
)),
))
}

pub fn toggle_maximize<Message>(id: window::Id) -> Command<Message> {
Command::single(command::Action::PlatformSpecific(
platform_specific::Action::Wayland(wayland::Action::Window(
Expand Down

0 comments on commit 01fe646

Please sign in to comment.