applied Connors cleanup patch of Eckehards proposed fix of applyrules(), thanks everyone involved
This commit is contained in:
		
							parent
							
								
									dec4850d05
								
							
						
					
					
						commit
						0f1f30daca
					
				
							
								
								
									
										6
									
								
								dwm.c
									
									
									
									
									
								
							
							
						
						
									
										6
									
								
								dwm.c
									
									
									
									
									
								
							| 
						 | 
					@ -289,13 +289,14 @@ applyrules(Client *c) {
 | 
				
			||||||
	unsigned int i;
 | 
						unsigned int i;
 | 
				
			||||||
	const Rule *r;
 | 
						const Rule *r;
 | 
				
			||||||
	Monitor *m;
 | 
						Monitor *m;
 | 
				
			||||||
	XClassHint ch = { 0 };
 | 
						XClassHint ch = { NULL, NULL };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* rule matching */
 | 
						/* rule matching */
 | 
				
			||||||
	c->isfloating = c->tags = 0;
 | 
						c->isfloating = c->tags = 0;
 | 
				
			||||||
	if(XGetClassHint(dpy, c->win, &ch)) {
 | 
						XGetClassHint(dpy, c->win, &ch);
 | 
				
			||||||
	class    = ch.res_class ? ch.res_class : broken;
 | 
						class    = ch.res_class ? ch.res_class : broken;
 | 
				
			||||||
	instance = ch.res_name  ? ch.res_name  : broken;
 | 
						instance = ch.res_name  ? ch.res_name  : broken;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	for(i = 0; i < LENGTH(rules); i++) {
 | 
						for(i = 0; i < LENGTH(rules); i++) {
 | 
				
			||||||
		r = &rules[i];
 | 
							r = &rules[i];
 | 
				
			||||||
		if((!r->title || strstr(c->name, r->title))
 | 
							if((!r->title || strstr(c->name, r->title))
 | 
				
			||||||
| 
						 | 
					@ -313,7 +314,6 @@ applyrules(Client *c) {
 | 
				
			||||||
		XFree(ch.res_class);
 | 
							XFree(ch.res_class);
 | 
				
			||||||
	if(ch.res_name)
 | 
						if(ch.res_name)
 | 
				
			||||||
		XFree(ch.res_name);
 | 
							XFree(ch.res_name);
 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
	c->tags = c->tags & TAGMASK ? c->tags & TAGMASK : c->mon->tagset[c->mon->seltags];
 | 
						c->tags = c->tags & TAGMASK ? c->tags & TAGMASK : c->mon->tagset[c->mon->seltags];
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user