summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnselm R Garbe <anselm@garbe.us>2009-06-24 19:51:41 +0100
committerAnselm R Garbe <anselm@garbe.us>2009-06-24 19:51:41 +0100
commite8aafb8e918967ac316faf469151f97379d0e672 (patch)
treea1c4db3e51c12e428b891bc43cf1f0b32a3e682f
parentseveral other focus fixes, introduced unfocus() (diff)
downloaddwm-e8aafb8e918967ac316faf469151f97379d0e672.tar.gz
dwm-e8aafb8e918967ac316faf469151f97379d0e672.zip
made bar based monitor switching working
Diffstat (limited to '')
-rw-r--r--dwm.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/dwm.c b/dwm.c
index d3169be..719db48 100644
--- a/dwm.c
+++ b/dwm.c
@@ -400,12 +400,9 @@ buttonpress(XEvent *e) {
400 for(m = mons; m; m = m->next) 400 for(m = mons; m; m = m->next)
401 if(ev->window == m->barwin) { 401 if(ev->window == m->barwin) {
402 if(m != selmon) { 402 if(m != selmon) {
403 if(selmon->stack) 403 unfocus(selmon->stack);
404 focus(selmon->stack); 404 selmon = m;
405 else { 405 focus(NULL);
406 selmon = m;
407 focus(NULL);
408 }
409 } 406 }
410 break; 407 break;
411 } 408 }
@@ -1608,6 +1605,7 @@ unfocus(Client *c) {
1608 return; 1605 return;
1609 grabbuttons(c, False); 1606 grabbuttons(c, False);
1610 XSetWindowBorder(dpy, c->win, dc.norm[ColBorder]); 1607 XSetWindowBorder(dpy, c->win, dc.norm[ColBorder]);
1608 XSetInputFocus(dpy, root, RevertToPointerRoot, CurrentTime);
1611} 1609}
1612 1610
1613void 1611void