Got questions, comments, patches, etc.?
Contact Jason Woofenden
gitweb
/
dwm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
491b097
)
focus new master when closing master
author
Jason Woofenden
<jason@jasonwoof.com>
Mon, 17 Nov 2014 22:19:52 +0000
(17:19 -0500)
committer
Jason Woofenden
<jason@jasonwoof.com>
Mon, 17 Nov 2014 22:19:52 +0000
(17:19 -0500)
dwm.c
patch
|
blob
|
history
diff --git
a/dwm.c
b/dwm.c
index
f8467d6
..
f123400
100644
(file)
--- a/
dwm.c
+++ b/
dwm.c
@@
-695,9
+695,10
@@
detachstack(Client *c) {
// WARNING if you detach() before detachstack() this will select last visible window
for(i = nextvisible(c->mon->clients); i && i != c; i = nextvisible(i->next))
next_sel = i;
// WARNING if you detach() before detachstack() this will select last visible window
for(i = nextvisible(c->mon->clients); i && i != c; i = nextvisible(i->next))
next_sel = i;
- // failing that, find first visible window
+ // failing that, find first visible window (besides c)
if (!next_sel)
if (!next_sel)
- for(i = nextvisible(c->mon->clients); i && i != c; i = nextvisible(i->next))
+ for(i = nextvisible(c->mon->clients); i && i == c; i = nextvisible(i->next));
+ if (i != c)
next_sel = i;
c->mon->sel = next_sel;
}
next_sel = i;
c->mon->sel = next_sel;
}