dwm.c
changeset 1511 68386bda4854
parent 1510 e9c916f6ea15
child 1514 2a8d8d41e50b
equal deleted inserted replaced
1510:e9c916f6ea15 1511:68386bda4854
   813 
   813 
   814 void
   814 void
   815 focus(Client *c) {
   815 focus(Client *c) {
   816 	if(!c || !ISVISIBLE(c))
   816 	if(!c || !ISVISIBLE(c))
   817 		for(c = selmon->stack; c && !ISVISIBLE(c); c = c->snext);
   817 		for(c = selmon->stack; c && !ISVISIBLE(c); c = c->snext);
   818 	if(c && c == selmon->sel) {
       
   819 		D fprintf(stderr, "focus, optimising focus away\n");
       
   820 		return;
       
   821 	}
       
   822 	if(selmon->sel)
   818 	if(selmon->sel)
   823 		unfocus(selmon->sel);
   819 		unfocus(selmon->sel);
   824 	if(c) {
   820 	if(c) {
   825 		if(c->mon != selmon)
   821 		if(c->mon != selmon)
   826 			selmon = c->mon;
   822 			selmon = c->mon;