diff options
| author | Anselm R. Garbe <arg@suckless.org> | 2007-04-19 09:24:25 +0200 |
|---|---|---|
| committer | Anselm R. Garbe <arg@suckless.org> | 2007-04-19 09:24:25 +0200 |
| commit | 22399a3bc05406a89f6ad717800b4d9ba41f6e0a (patch) | |
| tree | 78e7c817a7df86050b755b2ea1eb03ff96f136e2 | |
| parent | touch border (diff) | |
| download | dwm-22399a3bc05406a89f6ad717800b4d9ba41f6e0a.tar.gz dwm-22399a3bc05406a89f6ad717800b4d9ba41f6e0a.zip | |
fixed the border issue for mplayer, ff is definately broken when using F11 (fullscreen mode)
| -rw-r--r-- | client.c | 14 | ||||
| -rw-r--r-- | dwm.h | 2 | ||||
| -rw-r--r-- | main.c | 2 |
3 files changed, 12 insertions, 6 deletions
| @@ -185,9 +185,11 @@ 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->oldborder = wa->border_width; | ||
| 188 | if(c->w == sw && c->h == sh) { | 189 | if(c->w == sw && c->h == sh) { |
| 189 | c->x = sx; | 190 | c->x = sx; |
| 190 | c->y = sy; | 191 | c->y = sy; |
| 192 | c->border = wa->border_width; | ||
| 191 | } | 193 | } |
| 192 | else { | 194 | else { |
| 193 | if(c->x + c->w + 2 * c->border > wax + waw) | 195 | if(c->x + c->w + 2 * c->border > wax + waw) |
| @@ -198,15 +200,16 @@ manage(Window w, XWindowAttributes *wa) { | |||
| 198 | c->x = wax; | 200 | c->x = wax; |
| 199 | if(c->y < way) | 201 | if(c->y < way) |
| 200 | c->y = way; | 202 | c->y = way; |
| 203 | c->border = BORDERPX; | ||
| 201 | } | 204 | } |
| 205 | wc.border_width = c->border; | ||
| 206 | XConfigureWindow(dpy, w, CWBorderWidth, &wc); | ||
| 207 | XSetWindowBorder(dpy, w, dc.norm[ColBorder]); | ||
| 208 | configure(c); /* propagates border_width, if size doesn't change */ | ||
| 202 | updatesizehints(c); | 209 | updatesizehints(c); |
| 203 | XSelectInput(dpy, w, | 210 | XSelectInput(dpy, w, |
| 204 | StructureNotifyMask | PropertyChangeMask | EnterWindowMask); | 211 | StructureNotifyMask | PropertyChangeMask | EnterWindowMask); |
| 205 | grabbuttons(c, False); | 212 | grabbuttons(c, False); |
| 206 | c->border = wc.border_width = (c->w == sw && c->h == sh) ? wa->border_width : BORDERPX; | ||
| 207 | XConfigureWindow(dpy, w, CWBorderWidth, &wc); | ||
| 208 | XSetWindowBorder(dpy, w, dc.norm[ColBorder]); | ||
| 209 | configure(c); /* propagates border_width, if size doesn't change */ | ||
| 210 | updatetitle(c); | 213 | updatetitle(c); |
| 211 | if((rettrans = XGetTransientForHint(dpy, w, &trans) == Success)) | 214 | if((rettrans = XGetTransientForHint(dpy, w, &trans) == Success)) |
| 212 | for(t = clients; t && t->win != trans; t = t->next); | 215 | for(t = clients; t && t->win != trans; t = t->next); |
| @@ -378,10 +381,13 @@ updatetitle(Client *c) { | |||
| 378 | void | 381 | void |
| 379 | unmanage(Client *c) { | 382 | unmanage(Client *c) { |
| 380 | Client *nc; | 383 | Client *nc; |
| 384 | XWindowChanges wc; | ||
| 381 | 385 | ||
| 386 | wc.border_width = c->oldborder; | ||
| 382 | /* The server grab construct avoids race conditions. */ | 387 | /* The server grab construct avoids race conditions. */ |
| 383 | XGrabServer(dpy); | 388 | XGrabServer(dpy); |
| 384 | XSetErrorHandler(xerrordummy); | 389 | XSetErrorHandler(xerrordummy); |
| 390 | XConfigureWindow(dpy, c->win, CWBorderWidth, &wc); /* restore border */ | ||
| 385 | detach(c); | 391 | detach(c); |
| 386 | detachstack(c); | 392 | detachstack(c); |
| 387 | if(sel == c) { | 393 | if(sel == c) { |
| @@ -50,7 +50,7 @@ struct Client { | |||
| 50 | int basew, baseh, incw, inch, maxw, maxh, minw, minh; | 50 | int basew, baseh, incw, inch, maxw, maxh, minw, minh; |
| 51 | int minax, maxax, minay, maxay; | 51 | int minax, maxax, minay, maxay; |
| 52 | long flags; | 52 | long flags; |
| 53 | unsigned int border; | 53 | unsigned int border, oldborder; |
| 54 | Bool isbanned, isfixed, ismax, isfloating; | 54 | Bool isbanned, isfixed, ismax, isfloating; |
| 55 | Bool *tags; | 55 | Bool *tags; |
| 56 | Client *next; | 56 | Client *next; |
| @@ -81,7 +81,7 @@ initfont(const char *fontstr) { | |||
| 81 | dc.font.set = XCreateFontSet(dpy, fontstr, &missing, &n, &def); | 81 | dc.font.set = XCreateFontSet(dpy, fontstr, &missing, &n, &def); |
| 82 | if(missing) { | 82 | if(missing) { |
| 83 | while(n--) | 83 | while(n--) |
| 84 | fprintf(stderr, "missing fontset: %s\n", missing[n]); | 84 | fprintf(stderr, "dwm: missing fontset: %s\n", missing[n]); |
| 85 | XFreeStringList(missing); | 85 | XFreeStringList(missing); |
| 86 | } | 86 | } |
| 87 | if(dc.font.set) { | 87 | if(dc.font.set) { |
