Add window maximization API
Implement a simple API to set a window to maximized. Implement it only for the X11 backend.
This commit is contained in:
parent
17de3f1d15
commit
a4052b8693
4 changed files with 90 additions and 42 deletions
|
|
@ -402,6 +402,11 @@ pub struct WindowAttributes {
|
|||
/// The default is `"winit window"`.
|
||||
pub title: String,
|
||||
|
||||
/// Whether the window should be maximized upon creation.
|
||||
///
|
||||
/// The default is `false`.
|
||||
pub maximized: bool,
|
||||
|
||||
/// Whether the window should be immediately visible upon creation.
|
||||
///
|
||||
/// The default is `true`.
|
||||
|
|
@ -432,6 +437,7 @@ impl Default for WindowAttributes {
|
|||
max_dimensions: None,
|
||||
monitor: None,
|
||||
title: "winit window".to_owned(),
|
||||
maximized: false,
|
||||
visible: true,
|
||||
transparent: false,
|
||||
decorations: true,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue