commit 0d3b8a0b106d2655fb133fc70621ef6262930f3f
parent c855a6dad01adbd6cc70323ad27bf28c15948b06
Author: Anselm R. Garbe <garbeam@wmii.de>
Date: Wed, 1 Mar 2006 11:30:44 +0100
fixed some ugly stacking issues
Diffstat:
3 files changed, 15 insertions(+), 14 deletions(-)
diff --git a/cmd/wm/client.c b/cmd/wm/client.c
@@ -508,16 +508,18 @@ resize_client(Client *c, XRectangle *r, XPoint *pt)
XMoveResizeWindow(dpy, c->frame.win, px - (pi * rect.width) + c->frame.rect.x, c->frame.rect.y,
c->frame.rect.width, c->frame.rect.height);
- c->rect.x = bw;
- c->rect.y = bh ? bh : bw;
- c->rect.width = c->frame.rect.width - 2 * bw;
- c->rect.height = c->frame.rect.height - bw - (bh ? bh : bw);
+ if((c->area->mode != COL_STACK) || (c->area->sel == client2index(c))) {
+ c->rect.x = bw;
+ c->rect.y = bh ? bh : bw;
+ c->rect.width = c->frame.rect.width - 2 * bw;
+ c->rect.height = c->frame.rect.height - bw - (bh ? bh : bw);
- /* resize if client requests special size */
- check_dimensions(c, bh, bw);
+ /* resize if client requests special size */
+ check_dimensions(c, bh, bw);
- XMoveResizeWindow(dpy, c->win, c->rect.x, c->rect.y, c->rect.width, c->rect.height);
- configure_client(c);
+ XMoveResizeWindow(dpy, c->win, c->rect.x, c->rect.y, c->rect.width, c->rect.height);
+ configure_client(c);
+ }
}
int
diff --git a/cmd/wm/wm.c b/cmd/wm/wm.c
@@ -93,8 +93,7 @@ draw_pager()
unsigned int i, ic, ir, tw, th, rows, cols;
int dx;
- for(i = 0; (i < pagesz) && page[i]; i++);
- blitz_getbasegeometry(i, &cols, &rows);
+ blitz_getbasegeometry(npage - 1, &cols, &rows);
dx = (cols - 1) * DEF_PAGER_GAP; /* DEF_PAGER_GAPpx space */
tw = (rect.width - dx) / cols;
th = ((double) tw / rect.width) * rect.height;
@@ -102,7 +101,7 @@ draw_pager()
d.gc = gc_transient;
d.font = xfont;
d.align = CENTER;
- i = 0;
+ i = 1;
for(ir = 0; ir < rows; ir++) {
for(ic = 0; ic < cols; ic++) {
d.rect.x = ic * tw + (ic * DEF_PAGER_GAP);
@@ -113,7 +112,7 @@ draw_pager()
d.rect.y = ir * (rect.height - th) / (rows - 1);
d.rect.height = th;
draw_pager_page(i++, &d);
- if(!page[i])
+ if(i == npage)
return;
}
}
@@ -174,7 +173,7 @@ pager()
int i;
Client *c;
- if(!npage)
+ if(npage < 2)
return;
XClearWindow(dpy, transient);
diff --git a/rc/wmiirc b/rc/wmiirc
@@ -18,7 +18,7 @@ proglist() {
done | sort | uniq
}
-test -f $pidfile && kill -9 `cat $pidfile` 2>/dev/null
+test -f $pidfile && kill `cat $pidfile` 2>/dev/null
echo $$ >$pidfile
MODKEY=Alt