summaryrefslogtreecommitdiff
path: root/src/Fl_Gl_Choice.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/Fl_Gl_Choice.cxx')
-rw-r--r--src/Fl_Gl_Choice.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/Fl_Gl_Choice.cxx b/src/Fl_Gl_Choice.cxx
index a831eb4b6..88ed16d1c 100644
--- a/src/Fl_Gl_Choice.cxx
+++ b/src/Fl_Gl_Choice.cxx
@@ -380,7 +380,11 @@ void fl_no_gl_context() {
# elif defined(__APPLE_QUARTZ__)
// warning: the Quartz version should probably use Core GL (CGL) instead of AGL
AGLContext ctx = aglGetCurrentContext();
+# if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
+ if (ctx) aglSetWindowRef(ctx, NULL);
+# else
if (ctx) aglSetDrawable(ctx, NULL);
+# endif
aglSetCurrentContext(0);
# else
# error unsupported platform