fixed the border issue for mplayer, ff is definately broken when using F11 (fullscreen mode)
22399a3b
3 file(s) · +12 −6
| 185 | 185 | c->y = wa->y; |
|
| 186 | 186 | c->w = wa->width; |
|
| 187 | 187 | c->h = wa->height; |
|
| 188 | + | c->oldborder = wa->border_width; |
|
| 188 | 189 | if(c->w == sw && c->h == sh) { |
|
| 189 | 190 | c->x = sx; |
|
| 190 | 191 | c->y = sy; |
|
| 192 | + | c->border = wa->border_width; |
|
| 191 | 193 | } |
|
| 192 | 194 | else { |
|
| 193 | 195 | if(c->x + c->w + 2 * c->border > wax + waw) |
|
| 198 | 200 | c->x = wax; |
|
| 199 | 201 | if(c->y < way) |
|
| 200 | 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 | 209 | updatesizehints(c); |
|
| 203 | 210 | XSelectInput(dpy, w, |
|
| 204 | 211 | StructureNotifyMask | PropertyChangeMask | EnterWindowMask); |
|
| 205 | 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 | 213 | updatetitle(c); |
|
| 211 | 214 | if((rettrans = XGetTransientForHint(dpy, w, &trans) == Success)) |
|
| 212 | 215 | for(t = clients; t && t->win != trans; t = t->next); |
|
| 378 | 381 | void |
|
| 379 | 382 | unmanage(Client *c) { |
|
| 380 | 383 | Client *nc; |
|
| 384 | + | XWindowChanges wc; |
|
| 381 | 385 | ||
| 386 | + | wc.border_width = c->oldborder; |
|
| 382 | 387 | /* The server grab construct avoids race conditions. */ |
|
| 383 | 388 | XGrabServer(dpy); |
|
| 384 | 389 | XSetErrorHandler(xerrordummy); |
|
| 390 | + | XConfigureWindow(dpy, c->win, CWBorderWidth, &wc); /* restore border */ |
|
| 385 | 391 | detach(c); |
|
| 386 | 392 | detachstack(c); |
|
| 387 | 393 | if(sel == c) { |
|
| 50 | 50 | int basew, baseh, incw, inch, maxw, maxh, minw, minh; |
|
| 51 | 51 | int minax, maxax, minay, maxay; |
|
| 52 | 52 | long flags; |
|
| 53 | - | unsigned int border; |
|
| 53 | + | unsigned int border, oldborder; |
|
| 54 | 54 | Bool isbanned, isfixed, ismax, isfloating; |
|
| 55 | 55 | Bool *tags; |
|
| 56 | 56 | Client *next; |
| 81 | 81 | dc.font.set = XCreateFontSet(dpy, fontstr, &missing, &n, &def); |
|
| 82 | 82 | if(missing) { |
|
| 83 | 83 | while(n--) |
|
| 84 | - | fprintf(stderr, "missing fontset: %s\n", missing[n]); |
|
| 84 | + | fprintf(stderr, "dwm: missing fontset: %s\n", missing[n]); |
|
| 85 | 85 | XFreeStringList(missing); |
|
| 86 | 86 | } |
|
| 87 | 87 | if(dc.font.set) { |