summaryrefslogtreecommitdiff
path: root/src/Fl_Gl_Choice.cxx
diff options
context:
space:
mode:
authorAlbrecht Schlosser <albrechts.fltk@online.de>2010-03-14 18:07:24 +0000
committerAlbrecht Schlosser <albrechts.fltk@online.de>2010-03-14 18:07:24 +0000
commit998cc6df521a115454727d1ecf6bc7d4fee96f68 (patch)
tree70a1c9afffb294a75bd38484c2e6e4a042ac3426 /src/Fl_Gl_Choice.cxx
parent5bc66fafc348c547870bbf51c9c4a7215ad4ff25 (diff)
Merge of branch-1.3-Fl_Printer, with the following main changes:
(1) adding Fl_Device class (and more) for device abstraction (2) adding Fl_Pinter class (and more) for printing support. Todo: Code cleanup, update dependencies, remove/replace test print window. I'm looking into converting the test window popup in a global shortcut that would pop up the print dialog now... git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7263 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_Gl_Choice.cxx')
-rw-r--r--src/Fl_Gl_Choice.cxx10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/Fl_Gl_Choice.cxx b/src/Fl_Gl_Choice.cxx
index 88ed16d1c..75fc9dea8 100644
--- a/src/Fl_Gl_Choice.cxx
+++ b/src/Fl_Gl_Choice.cxx
@@ -315,11 +315,15 @@ GLContext fl_create_gl_context(Fl_Window* window, const Fl_Gl_Choice* g, int lay
aglEnable( (GLContext)context, AGL_BUFFER_RECT );
}
#if defined(__APPLE_COCOA__)
+
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
- aglSetWindowRef(context, MACwindowRef(window) );
-#else
- aglSetDrawable( context, GetWindowPort( MACwindowRef(window) ) );
+ if (aglSetWindowRef != NULL) {
+ aglSetWindowRef(context, MACwindowRef(window) );
+ }
+ else
#endif
+ aglSetDrawable( context, GetWindowPort( MACwindowRef(window) ) );
+
#else
aglSetDrawable( context, GetWindowPort( fl_xid(window) ) );
#endif