summaryrefslogtreecommitdiff
path: root/src/Fl_Overlay_Window.cxx
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>1998-10-15 14:06:16 +0000
committerMichael R Sweet <michael.r.sweet@gmail.com>1998-10-15 14:06:16 +0000
commit45bb73a9bf4692c68294be12a2e25a39ca3a307b (patch)
tree97b86255a274ec6415738788c180d5528f0948d1 /src/Fl_Overlay_Window.cxx
parent8b880adac62b6724c36405b173286362c386c227 (diff)
Commited WIN32 patches from Bill Spitzak and Gustavo Hime.
git-svn-id: file:///fltk/svn/fltk/trunk@11 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_Overlay_Window.cxx')
-rw-r--r--src/Fl_Overlay_Window.cxx11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/Fl_Overlay_Window.cxx b/src/Fl_Overlay_Window.cxx
index 7bbd85904..06a694c4a 100644
--- a/src/Fl_Overlay_Window.cxx
+++ b/src/Fl_Overlay_Window.cxx
@@ -20,10 +20,13 @@ void Fl_Overlay_Window::hide() {
}
void Fl_Overlay_Window::flush() {
- // a non-zero argument copies entire back buffer to window, erasing
- // the overlay. We should only do this if fake overlay needs redraw:
- uchar overlay_damage = damage()&8; clear_damage(damage()&~8);
- _flush(overlay_damage);
+ // turn off the bit set by redraw_overlay:
+ clear_damage(damage()&~8);
+ // 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:
if (overlay_ == this) draw_overlay();
}