Implement set_maximized, get_current_monitor, set_fullscreen and set_decorations for MacOS (#465)

* Added helper function for make monitor from display.

* Implement get_current_monitor  for macos

* Implemented with_fullscreen and set_fullscreen for macos

* Implemented set_decorations for macos

* Implement set_maximized and with_maximized for macos

* Changed fullscreen example fullscreen keypress from F11 to F

* Update CHANGELOG.md

* Add and fixed some comments

* Reformat and add more comments

* Better handling window and maximized state

* Reformat and typo fix
This commit is contained in:
Edwin Cheng 2018-04-18 02:07:54 +08:00 committed by Francesca Frangipane
parent 8fd49a4dbe
commit 0474dc9861
4 changed files with 318 additions and 45 deletions

View file

@ -51,7 +51,7 @@ fn main() {
..
} => match (virtual_code, state) {
(winit::VirtualKeyCode::Escape, _) => return ControlFlow::Break,
(winit::VirtualKeyCode::F11, winit::ElementState::Pressed) => {
(winit::VirtualKeyCode::F, winit::ElementState::Pressed) => {
is_fullscreen = !is_fullscreen;
if !is_fullscreen {
window.set_fullscreen(None);