diff --git a/src/gl/x11.rs b/src/gl/x11.rs index df7ce0c..5e90f8d 100644 --- a/src/gl/x11.rs +++ b/src/gl/x11.rs @@ -78,14 +78,12 @@ impl GlContext { /// /// Use [Self::get_fb_config_and_visual] to create both of these things. pub unsafe fn create( - window: c_ulong, display: *mut c_void, config: FbConfig, + window: c_ulong, display: *mut xlib::_XDisplay, config: FbConfig, ) -> Result { if display.is_null() { return Err(GlError::InvalidWindowHandle); } - let display = display as *mut xlib::_XDisplay; - errors::XErrorHandler::handle(display, |error_handler| { #[allow(non_snake_case)] let glXCreateContextAttribsARB: GlXCreateContextAttribsARB = { diff --git a/src/x11/window.rs b/src/x11/window.rs index e644442..f080d4b 100644 --- a/src/x11/window.rs +++ b/src/x11/window.rs @@ -324,7 +324,7 @@ impl Window { #[cfg(feature = "opengl")] let gl_context = fb_config.map(|fb_config| { let window = window_id as c_ulong; - let display = xcb_connection.conn.get_raw_dpy() as *mut c_void; + let display = xcb_connection.conn.get_raw_dpy(); // Because of the visual negotation we had to take some extra steps to create this context let context = unsafe { platform::GlContext::create(window, display, fb_config) }