summaryrefslogtreecommitdiff
path: root/dwm.c
diff options
context:
space:
mode:
Diffstat (limited to 'dwm.c')
-rw-r--r--dwm.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/dwm.c b/dwm.c
index 25881535..096895c4 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;
}