Browse Source

fixed focusmon brokeness

Anselm R Garbe 16 years ago
parent
commit
64674c395b
1 changed files with 5 additions and 7 deletions
  1. 5 7
      dwm.c

+ 5 - 7
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;
 		}