diff options
| author | arg@10ksloc.org <unknown> | 2006-07-20 12:18:06 +0200 | 
|---|---|---|
| committer | arg@10ksloc.org <unknown> | 2006-07-20 12:18:06 +0200 | 
| commit | dc5d967ee61046f899b3b49daeb9268c8161844a (patch) | |
| tree | 012a500412dc2c3a427a658d0f257c39de8351fb /client.c | |
| parent | fe3756c8e17f64d9b2aba93db28cb780f303f606 (diff) | |
| download | dwm-dc5d967ee61046f899b3b49daeb9268c8161844a.tar.gz dwm-dc5d967ee61046f899b3b49daeb9268c8161844a.tar.bz2 dwm-dc5d967ee61046f899b3b49daeb9268c8161844a.zip  | |
cleaned up code
Diffstat (limited to 'client.c')
| -rw-r--r-- | client.c | 16 | 
1 files changed, 10 insertions, 6 deletions
@@ -97,6 +97,7 @@ Client *  getclient(Window w)  {  	Client *c; +  	for(c = clients; c; c = c->next)  		if(c->win == w)  			return c; @@ -107,6 +108,7 @@ Client *  getctitle(Window w)  {  	Client *c; +  	for(c = clients; c; c = c->next)  		if(c->title == w)  			return c; @@ -198,8 +200,8 @@ manage(Window w, XWindowAttributes *wa)  {  	int diff;  	Client *c; -	XSetWindowAttributes twa;  	Window trans; +	XSetWindowAttributes twa;  	c = emallocz(sizeof(Client));  	c->win = w; @@ -278,6 +280,7 @@ void  pop(Client *c)  {  	Client **l; +  	for(l = &clients; *l && *l != c; l = &(*l)->next);  	*l = c->next; @@ -289,9 +292,9 @@ pop(Client *c)  void  resize(Client *c, Bool inc, Corner sticky)  { -	XConfigureEvent e; -	int right = c->x + c->w;  	int bottom = c->y + c->h; +	int right = c->x + c->w; +	XConfigureEvent e;  	if(inc) {  		if(c->incw) @@ -337,8 +340,9 @@ resize(Client *c, Bool inc, Corner sticky)  void  setsize(Client *c)  { -	XSizeHints size;  	long msize; +	XSizeHints size; +  	if(!XGetWMNormalHints(dpy, c->win, &size, &msize) || !size.flags)  		size.flags = PSize;  	c->flags = size.flags; @@ -375,9 +379,9 @@ setsize(Client *c)  void  settitle(Client *c)  { -	XTextProperty name; -	int n;  	char **list = NULL; +	int n; +	XTextProperty name;  	name.nitems = 0;  	c->name[0] = 0;  | 
