Add with_robustness and handle robustness on all implementations

This commit is contained in:
Pierre Krieger 2015-06-22 17:58:32 +02:00
parent 1aedc828c5
commit dbaca24cde
9 changed files with 216 additions and 36 deletions

View file

@ -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"))); },