fix: maximize instead of fullscreen

This fixes interactions with the window manager including dodging
exclusive zones, correctly sharpening corners when the window manager
sets the maximized mode, and correctly toggling the maximized state when
either F11 or the maximize button are clicked.
This commit is contained in:
Jeremy Soller 2024-02-12 09:53:59 -07:00 committed by GitHub
parent 072a3d5ca0
commit 02cee1d805
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 39 additions and 36 deletions

View file

@ -529,8 +529,8 @@ pub trait ApplicationExt: Application {
/// Initiates a window drag.
fn drag(&mut self) -> iced::Command<Message<Self::Message>>;
/// Fullscreens the window.
fn fullscreen(&mut self) -> iced::Command<Message<Self::Message>>;
/// Maximizes the window.
fn maximize(&mut self) -> iced::Command<Message<Self::Message>>;
/// Minimizes the window.
fn minimize(&mut self) -> iced::Command<Message<Self::Message>>;
@ -574,8 +574,8 @@ impl<App: Application> ApplicationExt for App {
command::drag(Some(window::Id::MAIN))
}
fn fullscreen(&mut self) -> iced::Command<Message<Self::Message>> {
command::fullscreen(Some(window::Id::MAIN))
fn maximize(&mut self) -> iced::Command<Message<Self::Message>> {
command::maximize(Some(window::Id::MAIN), true)
}
fn minimize(&mut self) -> iced::Command<Message<Self::Message>> {