applied autoresize patch
This commit is contained in:
parent
8a87c7f6f2
commit
e64fa96377
10
dwm.c
10
dwm.c
@ -103,7 +103,7 @@ struct Client {
|
|||||||
int basew, baseh, incw, inch, maxw, maxh, minw, minh;
|
int basew, baseh, incw, inch, maxw, maxh, minw, minh;
|
||||||
int bw, oldbw;
|
int bw, oldbw;
|
||||||
unsigned int tags;
|
unsigned int tags;
|
||||||
int isfixed, isfloating, isurgent, neverfocus, oldstate, isfullscreen;
|
int isfixed, isfloating, isurgent, neverfocus, oldstate, isfullscreen, needresize;
|
||||||
Client *next;
|
Client *next;
|
||||||
Client *snext;
|
Client *snext;
|
||||||
Monitor *mon;
|
Monitor *mon;
|
||||||
@ -676,6 +676,8 @@ configurerequest(XEvent *e)
|
|||||||
configure(c);
|
configure(c);
|
||||||
if (ISVISIBLE(c))
|
if (ISVISIBLE(c))
|
||||||
XMoveResizeWindow(dpy, c->win, c->x, c->y, c->w, c->h);
|
XMoveResizeWindow(dpy, c->win, c->x, c->y, c->w, c->h);
|
||||||
|
else
|
||||||
|
c->needresize = 1;
|
||||||
} else
|
} else
|
||||||
configure(c);
|
configure(c);
|
||||||
} else {
|
} else {
|
||||||
@ -1895,6 +1897,12 @@ showhide(Client *c)
|
|||||||
if (ISVISIBLE(c)) {
|
if (ISVISIBLE(c)) {
|
||||||
/* show clients top down */
|
/* show clients top down */
|
||||||
XMoveWindow(dpy, c->win, c->x, c->y);
|
XMoveWindow(dpy, c->win, c->x, c->y);
|
||||||
|
if (c->needresize) {
|
||||||
|
c->needresize = 0;
|
||||||
|
XMoveResizeWindow(dpy, c->win, c->x, c->y, c->w, c->h);
|
||||||
|
} else {
|
||||||
|
XMoveWindow(dpy, c->win, c->x, c->y);
|
||||||
|
}
|
||||||
if ((!c->mon->lt[c->mon->sellt]->arrange || c->isfloating) && !c->isfullscreen)
|
if ((!c->mon->lt[c->mon->sellt]->arrange || c->isfloating) && !c->isfullscreen)
|
||||||
resize(c, c->x, c->y, c->w, c->h, 0);
|
resize(c, c->x, c->y, c->w, c->h, 0);
|
||||||
showhide(c->snext);
|
showhide(c->snext);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user