diff options
| author | arg@10ksloc.org <unknown> | 2006-07-19 11:31:04 +0200 |
|---|---|---|
| committer | arg@10ksloc.org <unknown> | 2006-07-19 11:31:04 +0200 |
| commit | c53980cddcee8afd13ea793134ed3ddf5dbef0e3 (patch) | |
| tree | 44d98af7d722ffabac12eb271b81a74f9bd49834 /client.c | |
| parent | changed CFLAGs (diff) | |
| download | dwm-c53980cddcee8afd13ea793134ed3ddf5dbef0e3.tar.gz dwm-c53980cddcee8afd13ea793134ed3ddf5dbef0e3.zip | |
applied Sanders resize patch, fixed lower bug
Diffstat (limited to 'client.c')
| -rw-r--r-- | client.c | 10 |
1 files changed, 8 insertions, 2 deletions
| @@ -267,7 +267,7 @@ maximize(Arg *arg) | |||
| 267 | *sel->w = sw - 2 * sel->border; | 267 | *sel->w = sw - 2 * sel->border; |
| 268 | *sel->h = sh - 2 * sel->border - bh; | 268 | *sel->h = sh - 2 * sel->border - bh; |
| 269 | higher(sel); | 269 | higher(sel); |
| 270 | resize(sel, False); | 270 | resize(sel, False, TopLeft); |
| 271 | } | 271 | } |
| 272 | 272 | ||
| 273 | void | 273 | void |
| @@ -283,9 +283,11 @@ pop(Client *c) | |||
| 283 | } | 283 | } |
| 284 | 284 | ||
| 285 | void | 285 | void |
| 286 | resize(Client *c, Bool inc) | 286 | resize(Client *c, Bool inc, Corner sticky) |
| 287 | { | 287 | { |
| 288 | XConfigureEvent e; | 288 | XConfigureEvent e; |
| 289 | int right = *c->x + *c->w; | ||
| 290 | int bottom = *c->y + *c->h; | ||
| 289 | 291 | ||
| 290 | if(inc) { | 292 | if(inc) { |
| 291 | if(c->incw) | 293 | if(c->incw) |
| @@ -305,6 +307,10 @@ resize(Client *c, Bool inc) | |||
| 305 | *c->w = c->maxw; | 307 | *c->w = c->maxw; |
| 306 | if(c->maxh && *c->h > c->maxh) | 308 | if(c->maxh && *c->h > c->maxh) |
| 307 | *c->h = c->maxh; | 309 | *c->h = c->maxh; |
| 310 | if(sticky == TopRight || sticky == BottomRight) | ||
| 311 | *c->x = right - *c->w; | ||
| 312 | if(sticky == BottomLeft || sticky == BottomRight) | ||
| 313 | *c->y = bottom - *c->h; | ||
| 308 | resizetitle(c); | 314 | resizetitle(c); |
| 309 | XSetWindowBorderWidth(dpy, c->win, 1); | 315 | XSetWindowBorderWidth(dpy, c->win, 1); |
| 310 | XMoveResizeWindow(dpy, c->win, *c->x, *c->y, *c->w, *c->h); | 316 | XMoveResizeWindow(dpy, c->win, *c->x, *c->y, *c->w, *c->h); |
