Applying the client sel handling of quinq.

When after unmanaging the the last selected client was unmanaged, select the
last client.
This commit is contained in:
Christoph Lohmann 2014-01-26 18:48:52 +01:00
parent 0120447e04
commit 4b2dfb110f

View File

@ -1089,8 +1089,8 @@ unmanage(int c) {
spawn(NULL); spawn(NULL);
} }
} else { } else {
if(c == lastsel) { if(c && lastsel >= nclients) {
lastsel = -1; lastsel = nclients - 1;
} else if(lastsel > c) { } else if(lastsel > c) {
lastsel--; lastsel--;
} }