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

@ -45,7 +45,7 @@ impl Window {
{
let mut w_attr = Some(w_attr.clone());
let mut pl_attr = Some(pl_attr.clone());
let (tx, rx) = channel();
events_loop.execute_in_thread(move |inserter| {
@ -288,6 +288,11 @@ impl Window {
unimplemented!()
}
#[inline]
pub fn set_decorations(&self, _decorations: bool) {
unimplemented!()
}
#[inline]
pub fn get_current_monitor(&self) -> RootMonitorId {
unimplemented!()
@ -298,7 +303,7 @@ impl Drop for Window {
#[inline]
fn drop(&mut self) {
unsafe {
// We are sending WM_CLOSE, and our callback will process this by calling DefWindowProcW,
// We are sending WM_CLOSE, and our callback will process this by calling DefWindowProcW,
// which in turn will send a WM_DESTROY.
user32::PostMessageW(self.window.0, winapi::WM_CLOSE, 0, 0);
}