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

@ -309,6 +309,14 @@ impl Window2 {
&Window2::Wayland(ref w) => w.get_surface().ptr() as *mut _
}
}
#[inline]
pub fn set_maximized(&self, maximized: bool) {
match self {
&Window2::X(ref w) => w.set_maximized(maximized),
&Window2::Wayland(ref _w) => {},
}
}
}
unsafe extern "C" fn x_error_callback(dpy: *mut x11::ffi::Display, event: *mut x11::ffi::XErrorEvent)