Mercurial > dwm-meillo
comparison client.c @ 99:a19556fe83b5
applied Sanders resize patch, fixed lower bug
author | arg@10ksloc.org |
---|---|
date | Wed, 19 Jul 2006 11:31:04 +0200 |
parents | 5d88952cbf96 |
children | bb3803fb560c |
comparison
equal
deleted
inserted
replaced
98:f08394353588 | 99:a19556fe83b5 |
---|---|
265 *sel->x = sx; | 265 *sel->x = sx; |
266 *sel->y = sy + bh; | 266 *sel->y = sy + bh; |
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 |
274 pop(Client *c) | 274 pop(Client *c) |
275 { | 275 { |
281 clients = c; | 281 clients = c; |
282 arrange(NULL); | 282 arrange(NULL); |
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) |
292 *c->w -= (*c->w - c->basew) % c->incw; | 294 *c->w -= (*c->w - c->basew) % c->incw; |
293 if(c->inch) | 295 if(c->inch) |
303 *c->h = c->minh; | 305 *c->h = c->minh; |
304 if(c->maxw && *c->w > c->maxw) | 306 if(c->maxw && *c->w > c->maxw) |
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); |
311 e.type = ConfigureNotify; | 317 e.type = ConfigureNotify; |
312 e.event = c->win; | 318 e.event = c->win; |