aboutsummaryrefslogtreecommitdiffstats
path: root/client.c
diff options
context:
space:
mode:
authorAnselm R. Garbe <arg@suckless.org>2007-04-17 14:56:46 +0200
committerAnselm R. Garbe <arg@suckless.org>2007-04-17 14:56:46 +0200
commit464fc2cd18e82e6b1c169a5a7ce19f923d08d4e3 (patch)
tree6062e2c5cfc2c67c3f282580ab0621e63937b41c /client.c
parentbe8d6d40f60b45f941bd9cb6896b83ce223b6406 (diff)
downloaddwm-464fc2cd18e82e6b1c169a5a7ce19f923d08d4e3.tar.gz
changed border handling
Diffstat (limited to 'client.c')
-rw-r--r--client.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/client.c b/client.c
index b7fde1a..caef85c 100644
--- a/client.c
+++ b/client.c
@@ -185,13 +185,12 @@ manage(Window w, XWindowAttributes *wa) {
c->y = wa->y;
c->w = wa->width;
c->h = wa->height;
+ c->border = wa->border_width;
if(c->w == sw && c->h == sh) {
- c->border = 0;
c->x = sx;
c->y = sy;
}
else {
- c->border = BORDERPX;
if(c->x + c->w + 2 * c->border > wax + waw)
c->x = wax + waw - c->w - 2 * c->border;
if(c->y + c->h + 2 * c->border > way + wah)
@@ -205,7 +204,7 @@ manage(Window w, XWindowAttributes *wa) {
XSelectInput(dpy, w,
StructureNotifyMask | PropertyChangeMask | EnterWindowMask);
grabbuttons(c, False);
- wc.border_width = c->border;
+ wc.border_width = BORDERPX;
XConfigureWindow(dpy, w, CWBorderWidth, &wc);
XSetWindowBorder(dpy, w, dc.norm[ColBorder]);
configure(c); /* propagates border_width, if size doesn't change */
@@ -270,10 +269,6 @@ resize(Client *c, int x, int y, int w, int h, Bool sizehints) {
}
if(w <= 0 || h <= 0)
return;
- if(w == sw && h == sh)
- c->border = 0;
- else
- c->border = BORDERPX;
/* offscreen appearance fixes */
if(x > sw)
x = sw - w - 2 * c->border;