-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path12-dwm-6.0-autoresize.diff
36 lines (35 loc) · 1.13 KB
/
12-dwm-6.0-autoresize.diff
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
Homepage: http://hg.punctweb.ro
--- a/dwm.c 2013-02-11 22:11:39.265773226 +0200
+++ b/dwm.c 2013-02-11 22:11:39.268773225 +0200
@@ -91,7 +91,7 @@ struct Client {
int basew, baseh, incw, inch, maxw, maxh, minw, minh;
int bw, oldbw;
unsigned int tags;
- Bool isfixed, isfloating, isurgent, neverfocus, oldstate, isfullscreen;
+ Bool isfixed, isfloating, isurgent, neverfocus, oldstate, isfullscreen, needresize;
Client *next;
Client *snext;
Monitor *mon;
@@ -660,6 +660,8 @@ configurerequest(XEvent *e) {
configure(c);
if(ISVISIBLE(c))
XMoveResizeWindow(dpy, c->win, c->x, c->y, c->w, c->h);
+ else
+ c->needresize = True;
}
else
configure(c);
@@ -1716,7 +1718,12 @@ showhide(Client *c) {
if(!c)
return;
if(ISVISIBLE(c)) { /* show clients top down */
- XMoveWindow(dpy, c->win, c->x, c->y);
+ if(c->needresize) {
+ c->needresize = False;
+ 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, False);
showhide(c->snext);