From 45bb73a9bf4692c68294be12a2e25a39ca3a307b Mon Sep 17 00:00:00 2001 From: Michael R Sweet Date: Thu, 15 Oct 1998 14:06:16 +0000 Subject: Commited WIN32 patches from Bill Spitzak and Gustavo Hime. git-svn-id: file:///fltk/svn/fltk/trunk@11 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl_Overlay_Window.cxx | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/Fl_Overlay_Window.cxx') 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(); } -- cgit v1.2.3