wibox: stack correctly on attach

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Julien Danjou 2008-11-03 16:33:17 +01:00
parent d444cc8d59
commit 5c0716109b
1 changed files with 7 additions and 0 deletions

View File

@ -519,9 +519,14 @@ wibox_setvisible(wibox_t *wibox, bool v)
if(v != wibox->isvisible) if(v != wibox->isvisible)
{ {
if((wibox->isvisible = v)) if((wibox->isvisible = v))
{
xcb_map_window(globalconf.connection, wibox->sw.window); xcb_map_window(globalconf.connection, wibox->sw.window);
/* stack correctly the wibox */
client_stack();
}
else else
xcb_unmap_window(globalconf.connection, wibox->sw.window); xcb_unmap_window(globalconf.connection, wibox->sw.window);
/* kick out systray if needed */ /* kick out systray if needed */
wibox_systray_refresh(wibox); wibox_systray_refresh(wibox);
@ -600,6 +605,8 @@ wibox_attach(wibox_t *wibox, screen_t *s)
/* draw it right now once to avoid garbage shown */ /* draw it right now once to avoid garbage shown */
wibox_draw(wibox); wibox_draw(wibox);
xcb_map_window(globalconf.connection, wibox->sw.window); xcb_map_window(globalconf.connection, wibox->sw.window);
/* stack correctly the wibox */
client_stack();
} }
else else
wibox->need_update = true; wibox->need_update = true;