diff --git a/common/utils/T/tracer/gui/event.c b/common/utils/T/tracer/gui/event.c
index fe7f9fbb47215c571115b8e3b9396f5d63c81d8f..d5ead45a797a520f458e36984c8002dba455cbd0 100644
--- a/common/utils/T/tracer/gui/event.c
+++ b/common/utils/T/tracer/gui/event.c
@@ -132,6 +132,7 @@ static void dirty_event(struct gui *g, int id)
   if (win == NULL)
     { WARN("widget id %d not contained in a window\n", id); return; }
   g->xwin = win->x;
+  w->clear(g, w);
   w->paint(g, w);
   g->xwin = NULL;
   g->repainted = 1;
diff --git a/common/utils/T/tracer/gui/gui_defs.h b/common/utils/T/tracer/gui/gui_defs.h
index d7032f95daac0c1b0c0fced830d280864b36dd81..8a3e4b77018f606e2cdc68c005570316ab4787fe 100644
--- a/common/utils/T/tracer/gui/gui_defs.h
+++ b/common/utils/T/tracer/gui/gui_defs.h
@@ -46,6 +46,7 @@ struct widget {
   void (*allocate)(gui *g, widget *this, int x, int y, int width, int height);
   void (*hints)(gui *g, widget *this, int *width, int *height);
   void (*paint)(gui *g, widget *this);
+  void (*clear)(gui *g, widget *this);
 };
 
 struct widget_list {
diff --git a/common/utils/T/tracer/gui/widget.c b/common/utils/T/tracer/gui/widget.c
index 8304420aa13109598ca2fa95cbc049b4e31f6103..103d36d452a2d489e9d74716008a0895440ca6ae 100644
--- a/common/utils/T/tracer/gui/widget.c
+++ b/common/utils/T/tracer/gui/widget.c
@@ -6,6 +6,7 @@
 #include <stdarg.h>
 #include <string.h>
 
+static void default_clear(gui *gui, widget *_this);
 static void default_repack(gui *gui, widget *_this);
 static void default_allocate(
     gui *gui, widget *_this, int x, int y, int width, int height);
@@ -41,6 +42,7 @@ widget *new_widget(struct gui *g, enum widget_type type, int size)
   ret = calloc(1, size);
   if (ret == NULL) OOM;
 
+  ret->clear     = default_clear;
   ret->repack    = default_repack;
   ret->add_child = default_add_child;
   ret->allocate  = default_allocate;
@@ -120,6 +122,14 @@ repack:
 /*                           default functions                           */
 /*************************************************************************/
 
+static void default_clear(gui *_gui, widget *_this)
+{
+  struct gui *g = _gui;
+  struct widget *this = _this;
+  x_fill_rectangle(g->x, g->xwin, BACKGROUND_COLOR,
+      this->x, this->y, this->width, this->height);
+}
+
 static void default_repack(gui *gui, widget *_this)
 {
   struct widget *this = _this;