diff options
author | tomaka <pierre.krieger1708@gmail.com> | 2015-07-25 16:12:13 +0200 |
---|---|---|
committer | tomaka <pierre.krieger1708@gmail.com> | 2015-07-25 16:12:13 +0200 |
commit | 752593ebefee7e97d69edccb44e7a50a059879b0 (patch) | |
tree | 3680734696ec9a4409f29ac36f04b839fc33cdcf /src | |
parent | f6b7088011254b37a11111a5a19c896b7db0d7bd (diff) | |
parent | a97cbd172998aaccb8b1eda8dc361b080d8d3c8d (diff) | |
download | glutin-752593ebefee7e97d69edccb44e7a50a059879b0.tar.gz glutin-752593ebefee7e97d69edccb44e7a50a059879b0.zip |
Merge pull request #546 from tomaka/srgb-fix-attempt
Attempt to fix issues with sRGB
Diffstat (limited to 'src')
-rw-r--r-- | src/api/glx/mod.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/api/glx/mod.rs b/src/api/glx/mod.rs index e17f73d..72bdf03 100644 --- a/src/api/glx/mod.rs +++ b/src/api/glx/mod.rs @@ -358,6 +358,16 @@ unsafe fn enumerate_configs(glx: &ffi::glx::Glx, xlib: &ffi::Xlib, display: *mut }; Ok(configs.into_iter().filter_map(|config| { + if get_attrib(ffi::glx::X_RENDERABLE as libc::c_int, config) == 0 { + return None; + } + + if get_attrib(ffi::glx::X_VISUAL_TYPE as libc::c_int, config) != + ffi::glx::TRUE_COLOR as libc::c_int + { + return None; + } + if get_attrib(ffi::glx::DRAWABLE_TYPE as libc::c_int, config) & ffi::glx::WINDOW_BIT as libc::c_int == 0 { |