aboutsummaryrefslogtreecommitdiffstats
path: root/client.c
diff options
context:
space:
mode:
authorarg@10ksloc.org <unknown>2006-07-19 11:31:04 +0200
committerarg@10ksloc.org <unknown>2006-07-19 11:31:04 +0200
commitc53980cddcee8afd13ea793134ed3ddf5dbef0e3 (patch)
tree44d98af7d722ffabac12eb271b81a74f9bd49834 /client.c
parent95e56ffc0d91f55dcb138b25b6788378971485a5 (diff)
downloaddwm-c53980cddcee8afd13ea793134ed3ddf5dbef0e3.tar.gz
applied Sanders resize patch, fixed lower bug
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)
*sel->w = sw - 2 * sel->border;
*sel->h = sh - 2 * sel->border - bh;
higher(sel);
- resize(sel, False);
+ resize(sel, False, TopLeft);
}
void
@@ -283,9 +283,11 @@ pop(Client *c)
}
void
-resize(Client *c, Bool inc)
+resize(Client *c, Bool inc, Corner sticky)
{
XConfigureEvent e;
+ int right = *c->x + *c->w;
+ int bottom = *c->y + *c->h;
if(inc) {
if(c->incw)
@@ -305,6 +307,10 @@ resize(Client *c, Bool inc)
*c->w = c->maxw;
if(c->maxh && *c->h > c->maxh)
*c->h = c->maxh;
+ if(sticky == TopRight || sticky == BottomRight)
+ *c->x = right - *c->w;
+ if(sticky == BottomLeft || sticky == BottomRight)
+ *c->y = bottom - *c->h;
resizetitle(c);
XSetWindowBorderWidth(dpy, c->win, 1);
XMoveResizeWindow(dpy, c->win, *c->x, *c->y, *c->w, *c->h);
remember that computers suck.