summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2011-02-23 11:47:51 +0000
committerManolo Gouy <Manolo>2011-02-23 11:47:51 +0000
commit5a6da14af3884a55359bd148bcb79d62010c9f6b (patch)
tree1213951eac9a98cc38d10ccccff68e0a5b5bbb98 /src
parent6d38eb67bcea0621538954b83df4bc2d9fc6bf94 (diff)
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
Diffstat (limited to 'src')
-rw-r--r--src/Fl_Text_Display.cxx7
1 files changed, 5 insertions, 2 deletions
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 <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
- 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());