mirror of
https://github.com/leahneukirchen/cwm.git
synced 2023-08-10 21:13:12 +03:00
As mentioned in my last commit, there was an issue where the switching
code would always assume that the number of windows to switch to was three if there were more windows hidden. Check for CLIENT_HIDDEN when we count. Now it counts correctly. ok simon@.
This commit is contained in:
parent
f85ba10437
commit
fead0d511f
12
client.c
12
client.c
@ -642,17 +642,21 @@ client_cyclenext(int reverse)
|
||||
void
|
||||
client_cycleinfo(struct client_ctx *cc)
|
||||
{
|
||||
#define LISTSIZE 3
|
||||
int w, h, nlines, i, n, oneh, curn = -1, x, y, diff;
|
||||
struct client_ctx *ccc, *list[3];
|
||||
struct client_ctx *ccc, *list[LISTSIZE];
|
||||
struct screen_ctx *sc = CCTOSC(cc);
|
||||
struct fontdesc *font = DefaultFont;
|
||||
|
||||
memset(list, 0, sizeof(list));
|
||||
|
||||
nlines = 0;
|
||||
TAILQ_FOREACH(ccc, &sc->mruq, mru_entry)
|
||||
nlines++;
|
||||
nlines = MIN(nlines, 3);
|
||||
TAILQ_FOREACH(ccc, &sc->mruq, mru_entry) {
|
||||
if (!ccc->flags & CLIENT_HIDDEN) {
|
||||
if (++nlines == LISTSIZE)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
oneh = font_ascent(font) + font_descent(font) + 1;
|
||||
h = nlines*oneh;
|
||||
|
Loading…
Reference in New Issue
Block a user