Fl_Text_Display: avoid blinking by painting the full widget background only to the printer.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8466 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Manolo Gouy
2011-02-23 11:47:51 +00:00
parent 6d38eb67bc
commit 5a6da14af3
+4 -1
View File
@@ -38,6 +38,7 @@
#include <FL/Fl_Text_Buffer.H>
#include <FL/Fl_Text_Display.H>
#include <FL/Fl_Window.H>
#include <FL/Fl_Printer.H>
#undef min
#undef max
@@ -3359,8 +3360,10 @@ void Fl_Text_Display::draw(void) {
// draw the non-text, non-scrollbar areas.
if (damage() & FL_DAMAGE_ALL) {
// printf("drawing all (box = %d)\n", box());
// draw the background
if (Fl_Surface_Device::surface()->class_name() == Fl_Printer::class_id) {
// if to printer, draw the background
fl_rectf(text_area.x, text_area.y, text_area.w, text_area.h, color() );
}
// draw the box()
int W = w(), H = h();
draw_box(box(), x(), y(), W, H, color());