Add set_decorations method to Window (#365)

This has been stubbed on all platforms other than X11. The X11 implementation has also been
revised to toggle correctly, as it was previously only able to remove decorations.
This commit is contained in:
Francesca Sunshine 2017-12-22 07:50:46 -05:00 committed by Pierre Krieger
parent b36a8e010f
commit 463f316cb8
9 changed files with 79 additions and 37 deletions

View file

@ -44,7 +44,7 @@ impl EventsLoop {
MonitorId
}
pub fn poll_events<F>(&mut self, mut callback: F)
where F: FnMut(::Event)
{
@ -101,7 +101,7 @@ impl EventsLoop {
None
}
};
if let Some(event) = e {
callback(event);
}
@ -288,6 +288,11 @@ impl Window {
// Android has single screen maximized apps so nothing to do
}
#[inline]
pub fn set_decorations(&self, _decorations: bool) {
// N/A
}
#[inline]
pub fn get_current_monitor(&self) -> RootMonitorId {
RootMonitorId{inner: MonitorId}