From 00092b59bbddc590ce89e8321057f91fa07a5613 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 --- objects/wibox.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/objects/wibox.c b/objects/wibox.c index 161959303..159c6034b 100644 --- a/objects/wibox.c +++ b/objects/wibox.c @@ -193,12 +193,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