Client/Layout/Tag: Balance position of window in frame with resizehint, refresh only client size at resizehint toggle and fix layout with tag additional
This commit is contained in:
parent
f606b5ba88
commit
dc836ccb86
@ -1021,6 +1021,7 @@ void
|
||||
client_moveresize(Client *c, XRectangle geo, Bool r)
|
||||
{
|
||||
int os, e;
|
||||
int rhx = 0, rhy = 0;
|
||||
|
||||
if(!c)
|
||||
return;
|
||||
@ -1050,8 +1051,14 @@ client_moveresize(Client *c, XRectangle geo, Bool r)
|
||||
|
||||
/* Apply geometry hints */
|
||||
if(r)
|
||||
{
|
||||
client_geo_hints(&geo, c);
|
||||
|
||||
/* To balance position of window in frame */
|
||||
rhx = ((c->wrgeo.width) - geo.width) / 2;
|
||||
rhy = ((c->wrgeo.height) - geo.height) / 2;
|
||||
}
|
||||
|
||||
c->geo = geo;
|
||||
|
||||
/* Sett free_geo */
|
||||
@ -1066,7 +1073,7 @@ client_moveresize(Client *c, XRectangle geo, Bool r)
|
||||
|
||||
frame_moveresize(c, c->wrgeo);
|
||||
|
||||
XMoveResizeWindow(dpy, c->win, BORDH, TBARH, c->geo.width, c->geo.height);
|
||||
XMoveResizeWindow(dpy, c->win, BORDH + rhx, TBARH + rhy, c->geo.width, c->geo.height);
|
||||
|
||||
client_update_attributes(c);
|
||||
client_configure(c);
|
||||
|
||||
@ -778,12 +778,15 @@ uicb_togglemax(uicb_t cmd)
|
||||
void
|
||||
uicb_toggle_resizehint(uicb_t cmd)
|
||||
{
|
||||
Client *c;
|
||||
|
||||
screen_get_sel();
|
||||
(void)cmd;
|
||||
|
||||
tags[selscreen][seltag[selscreen]].resizehint = !tags[selscreen][seltag[selscreen]].resizehint;
|
||||
|
||||
tags[selscreen][seltag[selscreen]].layout.func(selscreen);
|
||||
for(c = tiled_client(selscreen, clients); c; c = tiled_client(selscreen, c->next))
|
||||
client_moveresize(c, c->geo, tags[selscreen][seltag[selscreen]].resizehint);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user