From dbaca24cde140052fb08fbe00924da4a528ea7cf Mon Sep 17 00:00:00 2001 From: Pierre Krieger Date: Mon, 22 Jun 2015 17:58:32 +0200 Subject: Add with_robustness and handle robustness on all implementations --- src/api/cocoa/mod.rs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/api/cocoa/mod.rs') diff --git a/src/api/cocoa/mod.rs b/src/api/cocoa/mod.rs index 772b906..332244e 100644 --- a/src/api/cocoa/mod.rs +++ b/src/api/cocoa/mod.rs @@ -13,6 +13,7 @@ use GlContext; use GlProfile; use GlRequest; use PixelFormat; +use Robustness; use native_monitor::NativeMonitorId; use objc::runtime::{Class, Object, Sel, BOOL, YES, NO}; @@ -332,6 +333,13 @@ impl Window { unimplemented!() } + match builder.gl_robustness { + Robustness::RobustNoResetNotification | Robustness::RobustLoseContextOnReset => { + return Err(CreationError::NotSupported); + }, + _ => () + } + let app = match Window::create_app() { Some(app) => app, None => { return Err(OsError(format!("Couldn't create NSApplication"))); }, -- cgit v1.2.3