mirror of
https://github.com/awesomeWM/awesome
synced 2024-11-17 07:47:41 +01:00
wibox: setvisible checks for screen
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
a760f4b0bc
commit
3af636c3e6
1 changed files with 20 additions and 15 deletions
35
wibox.c
35
wibox.c
|
@ -521,23 +521,28 @@ wibox_setvisible(wibox_t *wibox, bool v)
|
|||
{
|
||||
if(v != wibox->isvisible)
|
||||
{
|
||||
if((wibox->isvisible = v))
|
||||
wibox->isvisible = v;
|
||||
|
||||
if(wibox->screen != SCREEN_UNDEF)
|
||||
{
|
||||
xcb_map_window(globalconf.connection, wibox->sw.window);
|
||||
simplewindow_refresh_pixmap(&wibox->sw);
|
||||
/* stack correctly the wibox */
|
||||
client_stack();
|
||||
if(wibox->isvisible)
|
||||
{
|
||||
xcb_map_window(globalconf.connection, wibox->sw.window);
|
||||
simplewindow_refresh_pixmap(&wibox->sw);
|
||||
/* stack correctly the wibox */
|
||||
client_stack();
|
||||
}
|
||||
else
|
||||
xcb_unmap_window(globalconf.connection, wibox->sw.window);
|
||||
|
||||
/* kick out systray if needed */
|
||||
wibox_systray_refresh(wibox);
|
||||
|
||||
/* All the other wibox and ourselves need to be repositioned */
|
||||
wibox_array_t *w = &globalconf.screens[wibox->screen].wiboxes;
|
||||
for(int i = 0; i < w->len; i++)
|
||||
wibox_position_update(w->tab[i]);
|
||||
}
|
||||
else
|
||||
xcb_unmap_window(globalconf.connection, wibox->sw.window);
|
||||
|
||||
/* kick out systray if needed */
|
||||
wibox_systray_refresh(wibox);
|
||||
|
||||
/* All the other wibox and ourselves need to be repositioned */
|
||||
wibox_array_t *w = &globalconf.screens[wibox->screen].wiboxes;
|
||||
for(int i = 0; i < w->len; i++)
|
||||
wibox_position_update(w->tab[i]);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue