From: Anselm R Garbe Date: Sat, 27 Jun 2009 16:38:18 +0000 (+0100) Subject: fixed focusmon brokeness X-Git-Url: https://git.danieliu.xyz/?a=commitdiff_plain;h=64674c395b89f8d9640163cdcf9c8f4e25ba0e9c;p=dwm.git fixed focusmon brokeness --- diff --git a/dwm.c b/dwm.c index 2588153..096895c 100644 --- a/dwm.c +++ b/dwm.c @@ -804,13 +804,11 @@ focusmon(const Arg *arg) { for(i = 0, m = mons; m; m = m->next, i++) if(i == arg->ui) { - if(m->stack) - focus(m->stack); - else { - unfocus(selmon->stack); - selmon = m; - focus(NULL); - } + if(m == selmon) + return; + unfocus(selmon->sel); + selmon = m; + focus(NULL); drawbars(); break; }