aewl
changeset 129:c478383db7c9
applied sanders no_sizehints for tiled mode patch (thx!)
author | arg@10ksloc.org |
---|---|
date | Thu, 20 Jul 2006 19:09:11 +0200 |
parents | 0a407fbb8092 |
children | 30d1302dbe3b |
files | client.c dwm.h |
diffstat | 2 files changed, 11 insertions(+), 11 deletions(-) [+] |
line diff
1.1 --- a/client.c Thu Jul 20 18:23:43 2006 +0200 1.2 +++ b/client.c Thu Jul 20 19:09:11 2006 +0200 1.3 @@ -293,30 +293,30 @@ 1.4 } 1.5 1.6 void 1.7 -resize(Client *c, Bool inc, Corner sticky) 1.8 +resize(Client *c, Bool sizehints, Corner sticky) 1.9 { 1.10 int bottom = c->y + c->h; 1.11 int right = c->x + c->w; 1.12 XConfigureEvent e; 1.13 1.14 - if(inc) { 1.15 + if(sizehints) { 1.16 if(c->incw) 1.17 c->w -= (c->w - c->basew) % c->incw; 1.18 if(c->inch) 1.19 c->h -= (c->h - c->baseh) % c->inch; 1.20 + if(c->minw && c->w < c->minw) 1.21 + c->w = c->minw; 1.22 + if(c->minh && c->h < c->minh) 1.23 + c->h = c->minh; 1.24 + if(c->maxw && c->w > c->maxw) 1.25 + c->w = c->maxw; 1.26 + if(c->maxh && c->h > c->maxh) 1.27 + c->h = c->maxh; 1.28 } 1.29 if(c->x > sw) /* might happen on restart */ 1.30 c->x = sw - c->w; 1.31 if(c->y > sh) 1.32 c->y = sh - c->h; 1.33 - if(c->minw && c->w < c->minw) 1.34 - c->w = c->minw; 1.35 - if(c->minh && c->h < c->minh) 1.36 - c->h = c->minh; 1.37 - if(c->maxw && c->w > c->maxw) 1.38 - c->w = c->maxw; 1.39 - if(c->maxh && c->h > c->maxh) 1.40 - c->h = c->maxh; 1.41 if(sticky == TopRight || sticky == BotRight) 1.42 c->x = right - c->w; 1.43 if(sticky == BotLeft || sticky == BotRight)
2.1 --- a/dwm.h Thu Jul 20 18:23:43 2006 +0200 2.2 +++ b/dwm.h Thu Jul 20 19:09:11 2006 +0200 2.3 @@ -106,7 +106,7 @@ 2.4 extern void lower(Client *c); 2.5 extern void manage(Window w, XWindowAttributes *wa); 2.6 extern void pop(Client *c); 2.7 -extern void resize(Client *c, Bool inc, Corner sticky); 2.8 +extern void resize(Client *c, Bool sizehints, Corner sticky); 2.9 extern void setsize(Client *c); 2.10 extern void settitle(Client *c); 2.11 extern void togglemax(Arg *arg);