equal
deleted
inserted
replaced
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; |