From 5a6da14af3884a55359bd148bcb79d62010c9f6b Mon Sep 17 00:00:00 2001 From: Manolo Gouy Date: Wed, 23 Feb 2011 11:47:51 +0000 Subject: 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 --- src/Fl_Text_Display.cxx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/Fl_Text_Display.cxx b/src/Fl_Text_Display.cxx index a8fb8d817..026dbe94f 100644 --- a/src/Fl_Text_Display.cxx +++ b/src/Fl_Text_Display.cxx @@ -38,6 +38,7 @@ #include #include #include +#include #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 - fl_rectf(text_area.x, text_area.y, text_area.w, text_area.h, color() ); + 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()); -- cgit v1.2.3