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:
Kirill Chibisov 2020-09-22 04:54:47 +03:00 committed by GitHub
parent 644dc13e00
commit 71e3d25422
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 89 additions and 46 deletions

View file

@ -233,7 +233,7 @@ impl Window {
#[inline]
pub fn fullscreen(&self) -> Option<Fullscreen> {
if self.canvas.borrow().is_fullscreen() {
Some(Fullscreen::Borderless(self.current_monitor_inner()))
Some(Fullscreen::Borderless(Some(self.current_monitor_inner())))
} else {
None
}