client: Also check for struts on client_{ban,unban}
Signed-off-by: Maarten Maathuis <madman2003@gmail.com> Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
0aba4013e9
commit
dbbe48898a
17
client.c
17
client.c
|
@ -198,6 +198,10 @@ client_ban(client_t *c)
|
|||
}
|
||||
|
||||
c->isbanned = true;
|
||||
|
||||
/* All the wiboxes (may) need to be repositioned. */
|
||||
if(client_hasstrut(c))
|
||||
wibox_update_positions();
|
||||
}
|
||||
|
||||
/* Wait until the last moment to take away the focus from the window. */
|
||||
|
@ -987,6 +991,10 @@ client_unban(client_t *c)
|
|||
}
|
||||
|
||||
c->isbanned = false;
|
||||
|
||||
/* All the wiboxes (may) need to be repositioned. */
|
||||
if(client_hasstrut(c))
|
||||
wibox_update_positions();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1040,14 +1048,9 @@ client_unmanage(client_t *c)
|
|||
xcb_delete_property(globalconf.connection, c->win, _AWESOME_TAGS);
|
||||
xcb_delete_property(globalconf.connection, c->win, _AWESOME_FLOATING);
|
||||
|
||||
/* All the wiboxes (may) need to be repositioned. */
|
||||
if(client_hasstrut(c))
|
||||
/* All the wiboxes (may) need to be repositioned */
|
||||
for(int screen = 0; screen < globalconf.nscreen; screen++)
|
||||
for(int i = 0; i < globalconf.screens[screen].wiboxes.len; i++)
|
||||
{
|
||||
wibox_t *s = globalconf.screens[screen].wiboxes.tab[i];
|
||||
wibox_position_update(s);
|
||||
}
|
||||
wibox_update_positions();
|
||||
|
||||
/* set client as invalid */
|
||||
c->invalid = true;
|
||||
|
|
9
event.c
9
event.c
|
@ -223,14 +223,9 @@ event_handle_configurerequest(void *data __attribute__ ((unused)),
|
|||
|| geometry.width != c->geometry.width || geometry.height != c->geometry.height)
|
||||
{
|
||||
client_resize(c, geometry, false);
|
||||
/* All the wiboxes (may) need to be repositioned. */
|
||||
if(client_hasstrut(c))
|
||||
/* All the wiboxes (may) need to be repositioned */
|
||||
for(int screen = 0; screen < globalconf.nscreen; screen++)
|
||||
for(int i = 0; i < globalconf.screens[screen].wiboxes.len; i++)
|
||||
{
|
||||
wibox_t *s = globalconf.screens[screen].wiboxes.tab[i];
|
||||
wibox_position_update(s);
|
||||
}
|
||||
wibox_update_positions();
|
||||
client_need_arrange(c);
|
||||
}
|
||||
else
|
||||
|
|
9
ewmh.c
9
ewmh.c
|
@ -561,13 +561,8 @@ ewmh_client_strut_update(client_t *c, xcb_get_property_reply_t *strut_r)
|
|||
c->strut.bottom_end_x = strut[11];
|
||||
|
||||
client_need_arrange(c);
|
||||
/* All the wiboxes (may) need to be repositioned */
|
||||
for(int screen = 0; screen < globalconf.nscreen; screen++)
|
||||
for(int i = 0; i < globalconf.screens[screen].wiboxes.len; i++)
|
||||
{
|
||||
wibox_t *s = globalconf.screens[screen].wiboxes.tab[i];
|
||||
wibox_position_update(s);
|
||||
}
|
||||
/* All the wiboxes (may) need to be repositioned. */
|
||||
wibox_update_positions();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
13
wibox.c
13
wibox.c
|
@ -522,6 +522,19 @@ wibox_refresh(void)
|
|||
wibox_draw(c->titlebar);
|
||||
}
|
||||
|
||||
/** Reposition all wiboxes.
|
||||
*/
|
||||
void
|
||||
wibox_update_positions(void)
|
||||
{
|
||||
for(int screen = 0; screen < globalconf.nscreen; screen++)
|
||||
for(int i = 0; i < globalconf.screens[screen].wiboxes.len; i++)
|
||||
{
|
||||
wibox_t *s = globalconf.screens[screen].wiboxes.tab[i];
|
||||
wibox_position_update(s);
|
||||
}
|
||||
}
|
||||
|
||||
/** Set a wibox visible or not.
|
||||
* \param wibox The wibox.
|
||||
* \param v The visible value.
|
||||
|
|
Loading…
Reference in New Issue