X-Git-Url: https://jasonwoof.com/gitweb/?p=dwm.git;a=blobdiff_plain;f=dwm.c;h=096895c4617019542c64886f0d25a8c659e84f49;hp=2588153537cea507777067be764070d12aec3673;hb=64674c395b89f8d9640163cdcf9c8f4e25ba0e9c;hpb=b9dee2c6f172478b7a652cdf9d074ee0bd9acddc 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; }