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;
|
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. */
|
/* 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;
|
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_TAGS);
|
||||||
xcb_delete_property(globalconf.connection, c->win, _AWESOME_FLOATING);
|
xcb_delete_property(globalconf.connection, c->win, _AWESOME_FLOATING);
|
||||||
|
|
||||||
|
/* All the wiboxes (may) need to be repositioned. */
|
||||||
if(client_hasstrut(c))
|
if(client_hasstrut(c))
|
||||||
/* All the wiboxes (may) need to be repositioned */
|
wibox_update_positions();
|
||||||
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 client as invalid */
|
/* set client as invalid */
|
||||||
c->invalid = true;
|
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)
|
|| geometry.width != c->geometry.width || geometry.height != c->geometry.height)
|
||||||
{
|
{
|
||||||
client_resize(c, geometry, false);
|
client_resize(c, geometry, false);
|
||||||
|
/* All the wiboxes (may) need to be repositioned. */
|
||||||
if(client_hasstrut(c))
|
if(client_hasstrut(c))
|
||||||
/* All the wiboxes (may) need to be repositioned */
|
wibox_update_positions();
|
||||||
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);
|
|
||||||
}
|
|
||||||
client_need_arrange(c);
|
client_need_arrange(c);
|
||||||
}
|
}
|
||||||
else
|
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];
|
c->strut.bottom_end_x = strut[11];
|
||||||
|
|
||||||
client_need_arrange(c);
|
client_need_arrange(c);
|
||||||
/* All the wiboxes (may) need to be repositioned */
|
/* All the wiboxes (may) need to be repositioned. */
|
||||||
for(int screen = 0; screen < globalconf.nscreen; screen++)
|
wibox_update_positions();
|
||||||
for(int i = 0; i < globalconf.screens[screen].wiboxes.len; i++)
|
|
||||||
{
|
|
||||||
wibox_t *s = globalconf.screens[screen].wiboxes.tab[i];
|
|
||||||
wibox_position_update(s);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
13
wibox.c
13
wibox.c
|
@ -522,6 +522,19 @@ wibox_refresh(void)
|
||||||
wibox_draw(c->titlebar);
|
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.
|
/** Set a wibox visible or not.
|
||||||
* \param wibox The wibox.
|
* \param wibox The wibox.
|
||||||
* \param v The visible value.
|
* \param v The visible value.
|
||||||
|
|
1
wibox.h
1
wibox.h
|
@ -26,6 +26,7 @@
|
||||||
#include "swindow.h"
|
#include "swindow.h"
|
||||||
|
|
||||||
void wibox_refresh(void);
|
void wibox_refresh(void);
|
||||||
|
void wibox_update_positions(void);
|
||||||
|
|
||||||
int luaA_wibox_new(lua_State *);
|
int luaA_wibox_new(lua_State *);
|
||||||
int luaA_wibox_userdata_new(lua_State *, wibox_t *);
|
int luaA_wibox_userdata_new(lua_State *, wibox_t *);
|
||||||
|
|
Loading…
Reference in New Issue