commit ef260ab60461990c521ac1ec4d197cbf5273b79a
parent c017512c11d31a40f2bfbbcceb41d01a47beca5d
Author: Kris Maglione <jg@suckless.org>
Date: Sat, 22 Mar 2008 14:49:45 -0400
Ignore border with in wistrut calculations.
Diffstat:
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/cmd/strut/main.c b/cmd/strut/main.c
@@ -95,7 +95,6 @@ static void
getwinsize(Window *win) {
int x, y;
uint w, h;
- /* ignored */
XWindow root;
uint border, depth;
@@ -103,7 +102,7 @@ getwinsize(Window *win) {
&x, &y, &w, &h,
&border, &depth);
win->r = rectaddpt(Rect(0, 0, w, h),
- Pt(x, y));
+ Pt(x+border, y+border));
}
int
diff --git a/cmd/strut/win.c b/cmd/strut/win.c
@@ -85,7 +85,7 @@ config(Window *w, XConfigureEvent *ev) {
USED(w);
frame.r = rectaddpt(Rect(0, 0, ev->width, ev->height),
- Pt(ev->x, ev->y));
+ Pt(ev->x+ev->border_width, ev->y+ev->border_width));
restrut();
}