summaryrefslogtreecommitdiffstats
path: root/client.c
diff options
context:
space:
mode:
Diffstat (limited to 'client.c')
-rw-r--r--client.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/client.c b/client.c
index beb7e35..af2c249 100644
--- a/client.c
+++ b/client.c
@@ -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
273void 273void
@@ -283,9 +283,11 @@ pop(Client *c)
283} 283}
284 284
285void 285void
286resize(Client *c, Bool inc) 286resize(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);