aewl
changeset 500:d5ad819f2a66 1.7.1
fixing the settags issue, preparing 1.7.1
author | Anselm R. Garbe <arg@10kloc.org> |
---|---|
date | Wed, 27 Sep 2006 17:18:46 +0200 |
parents | 2ca011c56385 |
children | a067c5550e6f |
files | client.c config.mk dwm.h event.c |
diffstat | 4 files changed, 18 insertions(+), 16 deletions(-) [+] |
line diff
1.1 --- a/client.c Tue Sep 26 17:42:14 2006 +0200 1.2 +++ b/client.c Wed Sep 27 17:18:46 2006 +0200 1.3 @@ -54,19 +54,6 @@ 1.4 GrabModeAsync, GrabModeSync, None, None); 1.5 } 1.6 1.7 -static void 1.8 -resizetitle(Client *c) { 1.9 - c->tw = textw(c->name); 1.10 - if(c->tw > c->w) 1.11 - c->tw = c->w + 2; 1.12 - c->tx = c->x + c->w - c->tw + 2; 1.13 - c->ty = c->y; 1.14 - if(isvisible(c)) 1.15 - XMoveResizeWindow(dpy, c->twin, c->tx, c->ty, c->tw, c->th); 1.16 - else 1.17 - XMoveResizeWindow(dpy, c->twin, c->tx + 2 * sw, c->ty, c->tw, c->th); 1.18 -} 1.19 - 1.20 static int 1.21 xerrordummy(Display *dsply, XErrorEvent *ee) { 1.22 return 0; 1.23 @@ -250,11 +237,13 @@ 1.24 CWOverrideRedirect | CWBackPixmap | CWEventMask, &twa); 1.25 1.26 grabbuttons(c, False); 1.27 + updatetitle(c); 1.28 settags(c, getclient(trans)); 1.29 if(!c->isfloat) 1.30 c->isfloat = trans 1.31 || (c->maxw && c->minw && 1.32 c->maxw == c->minw && c->maxh == c->minh); 1.33 + resizetitle(c); 1.34 1.35 if(clients) 1.36 clients->prev = c; 1.37 @@ -262,7 +251,6 @@ 1.38 c->snext = stack; 1.39 stack = clients = c; 1.40 1.41 - updatetitle(c); 1.42 ban(c); 1.43 XMapWindow(dpy, c->win); 1.44 XMapWindow(dpy, c->twin); 1.45 @@ -321,6 +309,19 @@ 1.46 } 1.47 1.48 void 1.49 +resizetitle(Client *c) { 1.50 + c->tw = textw(c->name); 1.51 + if(c->tw > c->w) 1.52 + c->tw = c->w + 2; 1.53 + c->tx = c->x + c->w - c->tw + 2; 1.54 + c->ty = c->y; 1.55 + if(isvisible(c)) 1.56 + XMoveResizeWindow(dpy, c->twin, c->tx, c->ty, c->tw, c->th); 1.57 + else 1.58 + XMoveResizeWindow(dpy, c->twin, c->tx + 2 * sw, c->ty, c->tw, c->th); 1.59 +} 1.60 + 1.61 +void 1.62 updatesize(Client *c) { 1.63 long msize; 1.64 XSizeHints size; 1.65 @@ -382,7 +383,6 @@ 1.66 } 1.67 } 1.68 XFree(name.value); 1.69 - resizetitle(c); 1.70 } 1.71 1.72 void
2.1 --- a/config.mk Tue Sep 26 17:42:14 2006 +0200 2.2 +++ b/config.mk Wed Sep 27 17:18:46 2006 +0200 2.3 @@ -1,5 +1,5 @@ 2.4 # dwm version 2.5 -VERSION = 1.7 2.6 +VERSION = 1.7.1 2.7 2.8 # Customize below to fit your system 2.9
3.1 --- a/dwm.h Tue Sep 26 17:42:14 2006 +0200 3.2 +++ b/dwm.h Wed Sep 27 17:18:46 2006 +0200 3.3 @@ -117,6 +117,7 @@ 3.4 extern void killclient(Arg *arg); /* kill c nicely */ 3.5 extern void manage(Window w, XWindowAttributes *wa); /* manage new client */ 3.6 extern void resize(Client *c, Bool sizehints, Corner sticky); /* resize c*/ 3.7 +extern void resizetitle(Client *c); /* resizes c->twin correctly */ 3.8 extern void updatesize(Client *c); /* update the size structs of c */ 3.9 extern void updatetitle(Client *c); /* update the name of c */ 3.10 extern void unmanage(Client *c); /* destroy c */