Get rid of FullScreenState::get_monitor()

This commit is contained in:
Pedro Côrte-Real 2017-08-29 02:08:12 +01:00
parent b3ef9c8b22
commit 60b575a7c1
5 changed files with 13 additions and 19 deletions

View file

@ -108,7 +108,7 @@ impl WindowBuilder {
pub fn build(mut self, events_loop: &EventsLoop) -> Result<Window, CreationError> {
// resizing the window to the dimensions of the monitor when fullscreen
if self.window.dimensions.is_none() {
if let Some(monitor) = self.window.fullscreen.get_monitor() {
if let FullScreenState::Exclusive(ref monitor) = self.window.fullscreen {
self.window.dimensions = Some(monitor.get_dimensions());
}
}