wibox: setvisible checks for screen

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Julien Danjou 2008-12-09 16:23:39 +01:00
parent a760f4b0bc
commit 3af636c3e6
1 changed files with 20 additions and 15 deletions

View File

@ -521,7 +521,11 @@ wibox_setvisible(wibox_t *wibox, bool v)
{
if(v != wibox->isvisible)
{
if((wibox->isvisible = v))
wibox->isvisible = v;
if(wibox->screen != SCREEN_UNDEF)
{
if(wibox->isvisible)
{
xcb_map_window(globalconf.connection, wibox->sw.window);
simplewindow_refresh_pixmap(&wibox->sw);
@ -540,6 +544,7 @@ wibox_setvisible(wibox_t *wibox, bool v)
wibox_position_update(w->tab[i]);
}
}
}
/** Remove a wibox from a screen.
* \param wibox Wibox to detach from screen.