diff options
| author | Michael R Sweet <michael.r.sweet@gmail.com> | 1998-11-05 16:04:53 +0000 |
|---|---|---|
| committer | Michael R Sweet <michael.r.sweet@gmail.com> | 1998-11-05 16:04:53 +0000 |
| commit | 80b1529ef4d69d9e34a48a419a018d7f4d64054b (patch) | |
| tree | 7c743dc2f7f17654f1535314f6b0e6c5eadfc21b /src/Fl_Overlay_Window.cxx | |
| parent | 60399e3945dcfe9a2bb9f00f794d9e8634dd6bd9 (diff) | |
Multiple patches from Bill:
- Double-buffered window fixes.
- Tabs fixes.
- X/WIN32 fixes.
- Fl_Input fixes.
- Support for vsnprintf and friends.
- Support for printf-style arguments in utility functions.
git-svn-id: file:///fltk/svn/fltk/trunk@52 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_Overlay_Window.cxx')
| -rw-r--r-- | src/Fl_Overlay_Window.cxx | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/src/Fl_Overlay_Window.cxx b/src/Fl_Overlay_Window.cxx index 6b29b1c81..b25db96c5 100644 --- a/src/Fl_Overlay_Window.cxx +++ b/src/Fl_Overlay_Window.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_Overlay_Window.cxx,v 1.5 1998/10/21 14:20:15 mike Exp $" +// "$Id: Fl_Overlay_Window.cxx,v 1.6 1998/11/05 16:04:47 mike Exp $" // // Overlay window code for the Fast Light Tool Kit (FLTK). // @@ -43,13 +43,9 @@ void Fl_Overlay_Window::hide() { } void Fl_Overlay_Window::flush() { - // turn off the bit set by redraw_overlay: + int erase_overlay = (damage()&FL_DAMAGE_OVERLAY); clear_damage(damage()&~FL_DAMAGE_OVERLAY); - // even if damage() == 0, flush() will erase the fake overlay by - // copying back buffer over it. It will also set the clip to the - // region made by all the expose events: - Fl_Double_Window::flush(); - // Now draw the fake overlay, if any, using the current clip: + Fl_Double_Window::flush(erase_overlay); if (overlay_ == this) draw_overlay(); } @@ -67,7 +63,11 @@ Fl_Overlay_Window::~Fl_Overlay_Window() { int Fl_Overlay_Window::can_do_overlay() {return 0;} -void Fl_Overlay_Window::redraw_overlay() {overlay_ = this; damage(FL_DAMAGE_OVERLAY);} +void Fl_Overlay_Window::redraw_overlay() { + overlay_ = this; + clear_damage(damage()|FL_DAMAGE_OVERLAY); + Fl::damage(FL_DAMAGE_CHILD); +} #else @@ -127,9 +127,10 @@ void Fl_Overlay_Window::redraw_overlay() { } } if (shown()) { - if (overlay_ == this) - damage(FL_DAMAGE_OVERLAY); - else if (!overlay_->shown()) + if (overlay_ == this) { + clear_damage(damage()|FL_DAMAGE_OVERLAY); + Fl::damage(FL_DAMAGE_CHILD); + } else if (!overlay_->shown()) overlay_->show(); else overlay_->redraw(); @@ -139,5 +140,5 @@ void Fl_Overlay_Window::redraw_overlay() { #endif // -// End of "$Id: Fl_Overlay_Window.cxx,v 1.5 1998/10/21 14:20:15 mike Exp $". +// End of "$Id: Fl_Overlay_Window.cxx,v 1.6 1998/11/05 16:04:47 mike Exp $". // |
