diff options
| author | Michael R Sweet <michael.r.sweet@gmail.com> | 2003-01-15 00:14:46 +0000 |
|---|---|---|
| committer | Michael R Sweet <michael.r.sweet@gmail.com> | 2003-01-15 00:14:46 +0000 |
| commit | e695187237e0ce9f2ec366599764819b8ae61315 (patch) | |
| tree | e28978744c49f92254de75caab805859ca15eaef /src | |
| parent | 7fe8eeafb2d38367c07cb885e29c4d95c6d7ae9c (diff) | |
Possible fix for nested Fl_Double_Window bug on WIN32.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2908 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src')
| -rw-r--r-- | src/Fl_Double_Window.cxx | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/src/Fl_Double_Window.cxx b/src/Fl_Double_Window.cxx index a60ecfdbb..9ab4bb95c 100644 --- a/src/Fl_Double_Window.cxx +++ b/src/Fl_Double_Window.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_Double_Window.cxx,v 1.12.2.4.2.5 2002/01/01 15:11:30 easysw Exp $" +// "$Id: Fl_Double_Window.cxx,v 1.12.2.4.2.6 2003/01/15 00:14:46 easysw Exp $" // // Double-buffered window code for the Fast Light Tool Kit (FLTK). // @@ -187,6 +187,15 @@ extern void fl_restore_clip(); void Fl_Double_Window::flush() {flush(0);} void Fl_Double_Window::flush(int eraseoverlay) { +#ifdef WIN32 + // Windows seems to have trouble doing the double-buffer thing in sub- + // windows, so only create the backbuffer stuff for top-level windows. + if (parent()) { + Fl_Window::flush(); + return; + } +#endif // WIN32 + make_current(); // make sure fl_gc is non-zero Fl_X *myi = Fl_X::i(this); if (!myi->other_xid) { @@ -196,8 +205,11 @@ void Fl_Double_Window::flush(int eraseoverlay) { else #endif #ifdef __APPLE__ - // the Apple OS X window manager double buffers ALL windows anyway, so there is no need to waste memory and time - // BTW: Windows2000 and later also forces doublebuffering if transparent windows are beeing used (alpha channel) + // the Apple OS X window manager double buffers ALL windows + // anyway, so there is no need to waste memory and time. + // + // BTW: Windows2000 and later also forces doublebuffering if + // transparent windows are beeing used (alpha channel) if ( ( !QDIsPortBuffered( GetWindowPort(myi->xid) ) ) || force_doublebuffering_ ) myi->other_xid = fl_create_offscreen(w(), h()); #else @@ -296,5 +308,5 @@ Fl_Double_Window::~Fl_Double_Window() { } // -// End of "$Id: Fl_Double_Window.cxx,v 1.12.2.4.2.5 2002/01/01 15:11:30 easysw Exp $". +// End of "$Id: Fl_Double_Window.cxx,v 1.12.2.4.2.6 2003/01/15 00:14:46 easysw Exp $". // |
