Rework 'Fullscreen::Borderless' enum variant
This changes 'Fullscreen::Borderless' enum variant from 'Fullscreen::Borderless(MonitorHandle)' to 'Fullscreen::Borderless(Option<MonitorHandle>)'. Providing 'None' to it will result in picking the current monitor.
This commit is contained in:
parent
644dc13e00
commit
71e3d25422
14 changed files with 89 additions and 46 deletions
|
|
@ -519,7 +519,15 @@ pub unsafe fn create_window(
|
|||
msg_send![window, setScreen:video_mode.monitor().ui_screen()]
|
||||
}
|
||||
Some(Fullscreen::Borderless(ref monitor)) => {
|
||||
msg_send![window, setScreen:monitor.ui_screen()]
|
||||
let uiscreen: id = match &monitor {
|
||||
Some(monitor) => monitor.ui_screen() as id,
|
||||
None => {
|
||||
let uiscreen: id = msg_send![window, screen];
|
||||
uiscreen
|
||||
}
|
||||
};
|
||||
|
||||
msg_send![window, setScreen: uiscreen]
|
||||
}
|
||||
None => (),
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue