From a97cbd172998aaccb8b1eda8dc361b080d8d3c8d Mon Sep 17 00:00:00 2001 From: Pierre Krieger Date: Sat, 25 Jul 2015 15:10:07 +0200 Subject: Attempt to fix issues with sRGB --- src/api/glx/mod.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) 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 { -- cgit v1.2.3