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

@ -33,8 +33,11 @@ pub fn drag<M: Send + 'static>(id: Option<window::Id>) -> iced::Command<Message<
crate::command::drag(id).map(Message::Cosmic)
}
pub fn fullscreen<M: Send + 'static>(id: Option<window::Id>) -> iced::Command<Message<M>> {
crate::command::fullscreen(id).map(Message::Cosmic)
pub fn maximize<M: Send + 'static>(
id: Option<window::Id>,
maximized: bool,
) -> iced::Command<Message<M>> {
crate::command::maximize(id, maximized).map(Message::Cosmic)
}
pub fn minimize<M: Send + 'static>(id: Option<window::Id>) -> iced::Command<Message<M>> {
@ -60,6 +63,6 @@ pub fn set_windowed<M: Send + 'static>(id: Option<window::Id>) -> iced::Command<
crate::command::set_windowed(id).map(Message::Cosmic)
}
pub fn toggle_fullscreen<M: Send + 'static>(id: Option<window::Id>) -> iced::Command<Message<M>> {
crate::command::toggle_fullscreen(id).map(Message::Cosmic)
pub fn toggle_maximize<M: Send + 'static>(id: Option<window::Id>) -> iced::Command<Message<M>> {
crate::command::toggle_maximize(id).map(Message::Cosmic)
}