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:
Pedro Côrte-Real 2017-08-28 00:19:26 +01:00
parent 17de3f1d15
commit a4052b8693
4 changed files with 90 additions and 42 deletions

View file

@ -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,