Browse files

Merge branch 'upstream'

  • Loading branch information...
2 parents b8f40cd + f057170 commit 490451158154df181bc3132d7e9267feab93071b @aperezdc committed Feb 18, 2012
Showing with 6 additions and 3 deletions.
  1. +6 −3 dwm.c
View
9 dwm.c
@@ -401,9 +401,10 @@ arrange(Monitor *m) {
showhide(m->stack);
else for(m = mons; m; m = m->next)
showhide(m->stack);
- if(m)
+ if(m) {
arrangemon(m);
- else for(m = mons; m; m = m->next)
+ restack(m);
+ } else for(m = mons; m; m = m->next)
arrangemon(m);
}
@@ -412,7 +413,6 @@ arrangemon(Monitor *m) {
strncpy(m->ltsymbol, m->lt[m->sellt]->symbol, sizeof m->ltsymbol);
if(m->lt[m->sellt]->arrange)
m->lt[m->sellt]->arrange(m);
- restack(m);
}
void
@@ -1226,6 +1226,7 @@ motionnotify(XEvent *e) {
if(ev->window != root)
return;
if((m = recttomon(ev->x_root, ev->y_root, 1, 1)) != mon && mon) {
+ unfocus(selmon->sel, True);
selmon = m;
focus(NULL);
}
@@ -1439,6 +1440,8 @@ restack(Monitor *m) {
drawbar(m);
if(!m->sel)
return;
+ if(m->sel->isfloating || !m->lt[m->sellt]->arrange)
+ XRaiseWindow(dpy, m->sel->win);
if(m->lt[m->sellt]->arrange) {
wc.stack_mode = Below;
wc.sibling = m->barwin;

0 comments on commit 4904511

Please sign in to comment.