diff options
author | tomaka <pierre.krieger1708@gmail.com> | 2015-06-23 16:46:52 +0200 |
---|---|---|
committer | tomaka <pierre.krieger1708@gmail.com> | 2015-06-23 16:46:52 +0200 |
commit | 40b84577c3894190aecebf096349d916cd1d000e (patch) | |
tree | e2303fa1ff9990706e6be83f530ad9ab746606aa /src/api/cocoa/mod.rs | |
parent | 717ea3d5ba655a3ec18f834f5e27152e81c7a8b5 (diff) | |
parent | dbaca24cde140052fb08fbe00924da4a528ea7cf (diff) | |
download | glutin-40b84577c3894190aecebf096349d916cd1d000e.tar.gz glutin-40b84577c3894190aecebf096349d916cd1d000e.zip |
Merge pull request #497 from tomaka/robustness
Add with_robustness and handle robustness on all implementations
Diffstat (limited to 'src/api/cocoa/mod.rs')
-rw-r--r-- | src/api/cocoa/mod.rs | 8 |
1 files changed, 8 insertions, 0 deletions
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"))); }, |