summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Melcher <fltk@matthiasm.com>2004-12-27 19:16:42 +0000
committerMatthias Melcher <fltk@matthiasm.com>2004-12-27 19:16:42 +0000
commit1bc50aa780c6f7efd07756dc03a948ce8e536e15 (patch)
tree0fbc294ff894a4e024cab7430039b04717fb281f
parent3387edd24796eeb1c7d4a11a9bb7147493c83e58 (diff)
Fl_Double_Windows would always redraw their full content, even
if only little changes were done in the UI. OS X creates all windows double buffered, whch would lead FLTK to beleive that the background buffer was missing on every redraw, causing a complete redraw of the full UI. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@3953 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
-rw-r--r--CHANGES2
-rw-r--r--src/Fl_Double_Window.cxx15
2 files changed, 12 insertions, 5 deletions
diff --git a/CHANGES b/CHANGES
index eb5366d5e..1c69c7ce0 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,5 +1,7 @@
CHANGES IN FLTK 1.1.7
+ - Fl_Double_Window would cause a full redraw, even if only
+ small parts of the UI were changed on Mac OS X.
- Fl_JPEG_Image did not correctly handle errors reported
by the JPEG library (STR #652)
- Fl_Menu now draws sub-menu arrows like other toolkits
diff --git a/src/Fl_Double_Window.cxx b/src/Fl_Double_Window.cxx
index e3fc8edcd..7537c64b4 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.13 2004/11/21 15:33:24 easysw Exp $"
+// "$Id: Fl_Double_Window.cxx,v 1.12.2.4.2.14 2004/12/27 19:16:42 matthiaswm Exp $"
//
// Double-buffered window code for the Fast Light Tool Kit (FLTK).
//
@@ -251,15 +251,20 @@ void Fl_Double_Window::flush(int eraseoverlay) {
else
#endif
#ifdef __APPLE_QD__
- if ( ( !QDIsPortBuffered( GetWindowPort(myi->xid) ) ) || force_doublebuffering_ )
+ if ( ( !QDIsPortBuffered( GetWindowPort(myi->xid) ) )
+ || force_doublebuffering_ ) {
myi->other_xid = fl_create_offscreen(w(), h());
+ clear_damage(FL_DAMAGE_ALL);
+ }
#elif defined(__APPLE_QUARTZ__)
- if (force_doublebuffering_)
+ if (force_doublebuffering_) {
myi->other_xid = fl_create_offscreen(w(), h());
+ clear_damage(FL_DAMAGE_ALL);
+ }
#else
myi->other_xid = fl_create_offscreen(w(), h());
-#endif
clear_damage(FL_DAMAGE_ALL);
+#endif
}
#if USE_XDBE
if (use_xdbe) {
@@ -348,5 +353,5 @@ Fl_Double_Window::~Fl_Double_Window() {
}
//
-// End of "$Id: Fl_Double_Window.cxx,v 1.12.2.4.2.13 2004/11/21 15:33:24 easysw Exp $".
+// End of "$Id: Fl_Double_Window.cxx,v 1.12.2.4.2.14 2004/12/27 19:16:42 matthiaswm Exp $".
//