diff --git a/zero-ui-view/src/gl.rs b/zero-ui-view/src/gl.rs index 24f476ae6..5b8f1ea92 100644 --- a/zero-ui-view/src/gl.rs +++ b/zero-ui-view/src/gl.rs @@ -142,6 +142,10 @@ impl GlContextManager { ))] let display_pref = DisplayApiPreference::GlxThenEgl(Box::new(winit::platform::x11::register_xlib_error_hook)); + #[cfg(target_os = "macos")] + let display_pref = DisplayApiPreference::Cgl; + + // SAFETY: we are trusting the `raw_display_handle` from winit here. let display = unsafe { Display::new(display_handle, display_pref) }?;