From 1fceb8ac2cff3e04e91a3f37fc2641dca72d5ec5 Mon Sep 17 00:00:00 2001 From: Matthias Melcher Date: Wed, 19 Dec 2001 09:10:00 +0000 Subject: MacOS: added opaque window resizing, all events except Mac menus are now handled using Carbon, window activation fixed, GL_SWAP_TYPE default changed to make gl_overlay work. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1874 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl_Gl_Window.cxx | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src/Fl_Gl_Window.cxx') diff --git a/src/Fl_Gl_Window.cxx b/src/Fl_Gl_Window.cxx index 7e44098f8..f3759b43f 100644 --- a/src/Fl_Gl_Window.cxx +++ b/src/Fl_Gl_Window.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_Gl_Window.cxx,v 1.12.2.22.2.5 2001/12/18 11:00:09 matthiaswm Exp $" +// "$Id: Fl_Gl_Window.cxx,v 1.12.2.22.2.6 2001/12/19 09:10:00 matthiaswm Exp $" // // OpenGL window code for the Fast Light Tool Kit (FLTK). // @@ -54,7 +54,7 @@ #define COPY 3 // unchanged #define NODAMAGE 4 // unchanged even by X expose() events -static char SWAP_TYPE; // 0 = determine it from environment variable +static char SWAP_TYPE = 0 ; // 0 = determine it from environment variable //////////////////////////////////////////////////////////////// @@ -226,11 +226,16 @@ void Fl_Gl_Window::flush() { glDrawBuffer(GL_BACK); if (!SWAP_TYPE) { +#ifdef __APPLE__ + SWAP_TYPE = COPY; +#else SWAP_TYPE = UNDEFINED; +#endif const char* c = getenv("GL_SWAP_TYPE"); if (c) { if (!strcmp(c,"COPY")) SWAP_TYPE = COPY; else if (!strcmp(c, "NODAMAGE")) SWAP_TYPE = NODAMAGE; + else if (!strcmp(c, "SWAP")) SWAP_TYPE = SWAP; } } @@ -363,5 +368,5 @@ void Fl_Gl_Window::draw_overlay() {} #endif // -// End of "$Id: Fl_Gl_Window.cxx,v 1.12.2.22.2.5 2001/12/18 11:00:09 matthiaswm Exp $". +// End of "$Id: Fl_Gl_Window.cxx,v 1.12.2.22.2.6 2001/12/19 09:10:00 matthiaswm Exp $". // -- cgit v1.2.3