Author: manolo
Date: 2011-02-23 03:47:51 -0800 (Wed, 23 Feb 2011)
New Revision: 8466
Log:
Fl_Text_Display: avoid blinking by painting the full widget background only to 
the printer.

Modified:
   branches/branch-1.3/src/Fl_Text_Display.cxx

Modified: branches/branch-1.3/src/Fl_Text_Display.cxx
===================================================================
--- branches/branch-1.3/src/Fl_Text_Display.cxx 2011-02-23 02:02:53 UTC (rev 
8465)
+++ branches/branch-1.3/src/Fl_Text_Display.cxx 2011-02-23 11:47:51 UTC (rev 
8466)
@@ -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 @@
   // 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());

_______________________________________________
fltk-commit mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-commit

Reply via email to