diff options
| author | Manolo Gouy <Manolo> | 2015-09-07 15:52:41 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2015-09-07 15:52:41 +0000 |
| commit | a650237edf86dd7af0b82847bd48fb1bd2321085 (patch) | |
| tree | cb958c5505d6af039318a06e61077af1e6b81d79 /src | |
| parent | d7094249f03ed3d0c609cdac3940e4d679bfad35 (diff) | |
Moved a few Mac-specific lines from Fl_Gl_Window::show() to Fl_Gl_Window::mode()
where it is more easily understood.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10858 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src')
| -rw-r--r-- | src/Fl_Gl_Window.cxx | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/src/Fl_Gl_Window.cxx b/src/Fl_Gl_Window.cxx index 3b92864cc..744eb2d45 100644 --- a/src/Fl_Gl_Window.cxx +++ b/src/Fl_Gl_Window.cxx @@ -69,16 +69,6 @@ void Fl_Gl_Window::show() { if (!shown()) { if (!g) { g = Fl_Gl_Choice::find(mode_,alist); -#if defined(__APPLE__) - if (g && alist) { - // when the mode is set using the system-dependent alist, and if asking for double buffer, - // the FL_DOUBLE flag must be set in the mode_ member variable - const int *a = alist; - while (*a) { - if (*(a++) == kCGLPFADoubleBuffer) mode_ |= FL_DOUBLE; - } - } -#endif if (!g && (mode_ & FL_DOUBLE) == FL_SINGLE) { g = Fl_Gl_Choice::find(mode_ | FL_DOUBLE,alist); if (g) mode_ |= FL_FAKE_SINGLE; @@ -133,13 +123,18 @@ void Fl_Gl_Window::invalidate() { #endif } -/** - See const int Fl_Gl_Window::mode() const -*/ int Fl_Gl_Window::mode(int m, const int *a) { if (m == mode_ && a == alist) return 0; #ifndef __APPLE__ int oldmode = mode_; +#else + if (a) { // when the mode is set using the a array of system-dependent values, and if asking for double buffer, + // the FL_DOUBLE flag must be set in the mode_ member variable + const int *aa = a; + while (*aa) { + if (*(aa++) == kCGLPFADoubleBuffer) m |= FL_DOUBLE; + } + } #endif // !__APPLE__ #if !defined(WIN32) && !defined(__APPLE__) Fl_Gl_Choice* oldg = g; |
