summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>2003-01-15 00:14:46 +0000
committerMichael R Sweet <michael.r.sweet@gmail.com>2003-01-15 00:14:46 +0000
commite695187237e0ce9f2ec366599764819b8ae61315 (patch)
treee28978744c49f92254de75caab805859ca15eaef
parent7fe8eeafb2d38367c07cb885e29c4d95c6d7ae9c (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
-rw-r--r--CHANGES2
-rw-r--r--src/Fl_Double_Window.cxx20
2 files changed, 18 insertions, 4 deletions
diff --git a/CHANGES b/CHANGES
index 2ab1279a7..90fe3736f 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,8 @@
CHANGES IN FLTK 1.1.3
- Documentation updates.
+ - Fl_Double_Window couldn't be nested on WIN32. [SF Bug
+ #658219]
- Fl_Slider didn't call the callback function when the
user changed the value using the keyboard and the
"when" condition was FL_WHEN_RELEASE. [SF Bug #647072]
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 $".
//