diff options
author | DavidPartouche <david@manateedev.com> | 2014-09-18 14:03:03 +0200 |
---|---|---|
committer | Tomaka17 <pierre.krieger1708@gmail.com> | 2014-09-19 20:30:13 +0200 |
commit | 6f47e6ff8ca839899abb67b3d656e04231ca0cf8 (patch) | |
tree | aa50e07fffe229f4e4b2be28b85708f7800ca12d /src | |
parent | 55ebd4935ec649083e281cf2fa1abdcf224b7faa (diff) | |
download | glutin-6f47e6ff8ca839899abb67b3d656e04231ca0cf8.tar.gz glutin-6f47e6ff8ca839899abb67b3d656e04231ca0cf8.zip |
Changed is_fullscreen to monitor.is_some()
Diffstat (limited to 'src')
-rw-r--r-- | src/lib.rs | 3 | ||||
-rw-r--r-- | src/x11/mod.rs | 4 |
2 files changed, 2 insertions, 5 deletions
@@ -58,7 +58,6 @@ pub struct WindowBuilder { title: String, monitor: Option<winimpl::MonitorID>, gl_version: Option<(uint, uint)>, - is_fullscreen: bool, } impl WindowBuilder { @@ -69,7 +68,6 @@ impl WindowBuilder { title: "gl-init-rs window".to_string(), monitor: None, gl_version: None, - is_fullscreen: false, } } @@ -93,7 +91,6 @@ impl WindowBuilder { pub fn with_fullscreen(mut self, monitor: MonitorID) -> WindowBuilder { let MonitorID(monitor) = monitor; self.monitor = Some(monitor); - self.is_fullscreen = true; self } diff --git a/src/x11/mod.rs b/src/x11/mod.rs index 97552b0..7d732a2 100644 --- a/src/x11/mod.rs +++ b/src/x11/mod.rs @@ -129,7 +129,7 @@ impl Window { }; let mut window_attributes = ffi::CWBorderPixel | ffi::CWColormap | ffi:: CWEventMask; - if builder.is_fullscreen { + if builder.monitor.is_some() { window_attributes |= ffi::CWOverrideRedirect; unsafe { ffi::XF86VidModeSwitchToMode(display, screen_id, *modes.offset(best_mode as int)); @@ -251,7 +251,7 @@ impl Window { wm_delete_window: wm_delete_window, xf86_desk_mode: xf86_desk_mode, screen_id: screen_id, - is_fullscreen: builder.is_fullscreen, + is_fullscreen: builder.monitor.is_some(), }; // calling glViewport |