From 918dc6799269cc36268d4f71431344315a213ccb Mon Sep 17 00:00:00 2001 From: Adam Badawy Date: Sun, 25 Oct 2015 21:47:47 -0400 Subject: Fix issue #582 I switched `vsyncstart` and `vdisplay` again, as per the discussion on issue #582. --- src/api/x11/window.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/api') diff --git a/src/api/x11/window.rs b/src/api/x11/window.rs index 0196f67..8ab87de 100644 --- a/src/api/x11/window.rs +++ b/src/api/x11/window.rs @@ -325,7 +325,7 @@ impl Window { let mode_to_switch_to = if window_attrs.monitor.is_some() { let matching_mode = (0 .. mode_num).map(|i| { let m: ffi::XF86VidModeModeInfo = ptr::read(*modes.offset(i as isize) as *const _); m - }).find(|m| m.hdisplay == dimensions.0 as u16 && m.vsyncstart == dimensions.1 as u16); + }).find(|m| m.hdisplay == dimensions.0 as u16 && m.vdisplay == dimensions.1 as u16); if let Some(matching_mode) = matching_mode { Some(matching_mode) @@ -333,7 +333,7 @@ impl Window { } else { let m = (0 .. mode_num).map(|i| { let m: ffi::XF86VidModeModeInfo = ptr::read(*modes.offset(i as isize) as *const _); m - }).find(|m| m.hdisplay >= dimensions.0 as u16 && m.vsyncstart == dimensions.1 as u16); + }).find(|m| m.hdisplay >= dimensions.0 as u16 && m.vdisplay == dimensions.1 as u16); match m { Some(m) => Some(m), -- cgit v1.2.3