From 12977febeeb47acd7f4fdff2990786b021dd0ea9 Mon Sep 17 00:00:00 2001 From: Uli Schlachter Date: Sat, 7 Nov 2009 20:06:46 +0100 Subject: [PATCH] Set a wibox' bit gravity to NorthWest. After the last patch, after each resize the X server fills the complete wibox with its background color which means that the widgets will still flicker. This patch fixes this by setting the wibox' bit gravity to NorthWest. This means that if a wibox is enlarged, only the new, larger part will be filled with the wibox' background color and the rest of the wibox' content will be left intact. With this patch I couldn't see any flickering anymore. Signed-off-by: Uli Schlachter Signed-off-by: Julien Danjou --- wibox.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wibox.c b/wibox.c index 392e8ed4..3310c676 100644 --- a/wibox.c +++ b/wibox.c @@ -166,12 +166,13 @@ wibox_init(wibox_t *w, int phys_screen) w->geometry.x, w->geometry.y, w->geometry.width, w->geometry.height, w->border_width, XCB_COPY_FROM_PARENT, s->root_visual, - XCB_CW_BACK_PIXEL | XCB_CW_BORDER_PIXEL + XCB_CW_BACK_PIXEL | XCB_CW_BORDER_PIXEL | XCB_CW_BIT_GRAVITY | XCB_CW_OVERRIDE_REDIRECT | XCB_CW_EVENT_MASK, (const uint32_t []) { w->ctx.bg.pixel, w->border_color.pixel, + XCB_GRAVITY_NORTH_WEST, 1, XCB_EVENT_MASK_SUBSTRUCTURE_REDIRECT | XCB_EVENT_MASK_SUBSTRUCTURE_NOTIFY | XCB_EVENT_MASK_ENTER_WINDOW