Get rid of FullScreenState::get_monitor()
This commit is contained in:
parent
b3ef9c8b22
commit
60b575a7c1
5 changed files with 13 additions and 19 deletions
|
|
@ -21,6 +21,7 @@ use CursorState;
|
|||
use MouseCursor;
|
||||
use WindowAttributes;
|
||||
use FullScreenState;
|
||||
use MonitorId as RootMonitorId;
|
||||
|
||||
use dwmapi;
|
||||
use kernel32;
|
||||
|
|
@ -328,12 +329,13 @@ unsafe fn init(window: WindowAttributes, pl_attribs: PlatformSpecificWindowBuild
|
|||
// switching to fullscreen if necessary
|
||||
// this means adjusting the window's position so that it overlaps the right monitor,
|
||||
// and change the monitor's resolution if necessary
|
||||
if let Some(ref monitor) = window.fullscreen.get_monitor() {
|
||||
let fullscreen = if let FullScreenState::Exclusive(RootMonitorId(ref monitor)) = window.fullscreen {
|
||||
try!(switch_to_fullscreen(&mut rect, monitor));
|
||||
true
|
||||
} else {
|
||||
false
|
||||
};
|
||||
|
||||
let fullscreen = window.fullscreen.get_monitor().is_some();
|
||||
|
||||
// computing the style and extended style of the window
|
||||
let (ex_style, style) = if fullscreen || !window.decorations {
|
||||
(winapi::WS_EX_APPWINDOW,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue