diff options
author | Eddy Pedroni <epedroni@pm.me> | 2023-12-16 17:54:15 +0100 |
---|---|---|
committer | Eddy Pedroni <epedroni@pm.me> | 2023-12-16 17:54:15 +0100 |
commit | 150a464293ba7d43241fd27536f00bd0acd01e01 (patch) | |
tree | 97abbb26a340dc5cf2ea8d56c18b01ac4707c005 | |
parent | 24ddb4b3399cf9abd5118081bbfcab8ae9046a72 (diff) |
Apply autoresize 6.1 cleanly
-rw-r--r-- | dwm.c | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -92,7 +92,7 @@ struct Client { int basew, baseh, incw, inch, maxw, maxh, minw, minh, hintsvalid; int bw, oldbw; unsigned int tags; - int isfixed, isfloating, isurgent, neverfocus, oldstate, isfullscreen; + int isfixed, isfloating, isurgent, neverfocus, oldstate, isfullscreen, needresize; Client *next; Client *snext; Monitor *mon; @@ -673,6 +673,8 @@ configurerequest(XEvent *e) configure(c); if (ISVISIBLE(c)) XMoveResizeWindow(dpy, c->win, c->x, c->y, c->w, c->h); + else + c->needresize = 1; } else configure(c); } else { @@ -1856,6 +1858,12 @@ showhide(Client *c) if (ISVISIBLE(c)) { /* show clients top down */ 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) resize(c, c->x, c->y, c->w, c->h, 0); showhide(c->snext); |