From 2c4bc7315542f8bbd49c30d0bbe801b019810df0 Mon Sep 17 00:00:00 2001 From: Cedric Roux <cedric.roux@eurecom.fr> Date: Mon, 11 Apr 2016 16:39:02 +0200 Subject: [PATCH] clear newly created pixmap to avoid some flickering when resizing windows --- common/utils/T/tracer/gui/x.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/common/utils/T/tracer/gui/x.c b/common/utils/T/tracer/gui/x.c index b498654fdb..04b110a435 100644 --- a/common/utils/T/tracer/gui/x.c +++ b/common/utils/T/tracer/gui/x.c @@ -74,6 +74,8 @@ x_window *x_create_window(x_connection *_x, int width, int height, ret->p = XCreatePixmap(x->d, ret->w, width, height, DefaultDepth(x->d, DefaultScreen(x->d))); + XFillRectangle(x->d, ret->p, x->colors[BACKGROUND_COLOR], + 0, 0, width, height); /* enable backing store */ { @@ -194,6 +196,8 @@ printf("resize old %d %d new %d %d\n", xw->width, xw->height, xw->new_width, xw- XFreePixmap(x->d, xw->p); xw->p = XCreatePixmap(x->d, xw->w, xw->width, xw->height, DefaultDepth(x->d, DefaultScreen(x->d))); + XFillRectangle(x->d, xw->p, x->colors[BACKGROUND_COLOR], + 0, 0, xw->width, xw->height); //xw->repaint = 1; } } -- GitLab