summaryrefslogtreecommitdiffstats
path: root/client.c
diff options
context:
space:
mode:
authorAnselm R. Garbe <arg@suckless.org>2007-04-19 09:24:25 +0200
committerAnselm R. Garbe <arg@suckless.org>2007-04-19 09:24:25 +0200
commit22399a3bc05406a89f6ad717800b4d9ba41f6e0a (patch)
tree78e7c817a7df86050b755b2ea1eb03ff96f136e2 /client.c
parenttouch border (diff)
downloaddwm-22399a3bc05406a89f6ad717800b4d9ba41f6e0a.tar.gz
dwm-22399a3bc05406a89f6ad717800b4d9ba41f6e0a.zip
fixed the border issue for mplayer, ff is definately broken when using F11 (fullscreen mode)
Diffstat (limited to '')
-rw-r--r--client.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/client.c b/client.c
index e267b63..03d158f 100644
--- a/client.c
+++ b/client.c
@@ -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) {
378void 381void
379unmanage(Client *c) { 382unmanage(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) {