diff options
| author | Anselm R. Garbe <arg@suckless.org> | 2007-04-17 14:56:46 +0200 |
|---|---|---|
| committer | Anselm R. Garbe <arg@suckless.org> | 2007-04-17 14:56:46 +0200 |
| commit | 464fc2cd18e82e6b1c169a5a7ce19f923d08d4e3 (patch) | |
| tree | 6062e2c5cfc2c67c3f282580ab0621e63937b41c /client.c | |
| parent | changing order of c->border restorage (diff) | |
| download | dwm-464fc2cd18e82e6b1c169a5a7ce19f923d08d4e3.tar.gz dwm-464fc2cd18e82e6b1c169a5a7ce19f923d08d4e3.zip | |
changed border handling
Diffstat (limited to 'client.c')
| -rw-r--r-- | client.c | 9 |
1 files changed, 2 insertions, 7 deletions
| @@ -185,13 +185,12 @@ manage(Window w, XWindowAttributes *wa) { | |||
| 185 | c->y = wa->y; | 185 | c->y = wa->y; |
| 186 | c->w = wa->width; | 186 | c->w = wa->width; |
| 187 | c->h = wa->height; | 187 | c->h = wa->height; |
| 188 | c->border = wa->border_width; | ||
| 188 | if(c->w == sw && c->h == sh) { | 189 | if(c->w == sw && c->h == sh) { |
| 189 | c->border = 0; | ||
| 190 | c->x = sx; | 190 | c->x = sx; |
| 191 | c->y = sy; | 191 | c->y = sy; |
| 192 | } | 192 | } |
| 193 | else { | 193 | else { |
| 194 | c->border = BORDERPX; | ||
| 195 | if(c->x + c->w + 2 * c->border > wax + waw) | 194 | if(c->x + c->w + 2 * c->border > wax + waw) |
| 196 | c->x = wax + waw - c->w - 2 * c->border; | 195 | c->x = wax + waw - c->w - 2 * c->border; |
| 197 | if(c->y + c->h + 2 * c->border > way + wah) | 196 | if(c->y + c->h + 2 * c->border > way + wah) |
| @@ -205,7 +204,7 @@ manage(Window w, XWindowAttributes *wa) { | |||
| 205 | XSelectInput(dpy, w, | 204 | XSelectInput(dpy, w, |
| 206 | StructureNotifyMask | PropertyChangeMask | EnterWindowMask); | 205 | StructureNotifyMask | PropertyChangeMask | EnterWindowMask); |
| 207 | grabbuttons(c, False); | 206 | grabbuttons(c, False); |
| 208 | wc.border_width = c->border; | 207 | wc.border_width = BORDERPX; |
| 209 | XConfigureWindow(dpy, w, CWBorderWidth, &wc); | 208 | XConfigureWindow(dpy, w, CWBorderWidth, &wc); |
| 210 | XSetWindowBorder(dpy, w, dc.norm[ColBorder]); | 209 | XSetWindowBorder(dpy, w, dc.norm[ColBorder]); |
| 211 | configure(c); /* propagates border_width, if size doesn't change */ | 210 | 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) { | |||
| 270 | } | 269 | } |
| 271 | if(w <= 0 || h <= 0) | 270 | if(w <= 0 || h <= 0) |
| 272 | return; | 271 | return; |
| 273 | if(w == sw && h == sh) | ||
| 274 | c->border = 0; | ||
| 275 | else | ||
| 276 | c->border = BORDERPX; | ||
| 277 | /* offscreen appearance fixes */ | 272 | /* offscreen appearance fixes */ |
| 278 | if(x > sw) | 273 | if(x > sw) |
| 279 | x = sw - w - 2 * c->border; | 274 | x = sw - w - 2 * c->border; |
