mirror of
https://github.com/leahneukirchen/cwm.git
synced 2023-08-10 21:13:12 +03:00
make it possible to cycle through the windows when non are selected.
(eg. when they're hidden, now you can cycle through them) from aon@iki.fi
This commit is contained in:
13
client.c
13
client.c
@@ -604,14 +604,23 @@ match:
|
||||
*/
|
||||
|
||||
struct client_ctx *
|
||||
client_cyclenext(struct client_ctx *cc, int reverse)
|
||||
client_cyclenext(int reverse)
|
||||
{
|
||||
struct screen_ctx *sc = CCTOSC(cc);
|
||||
struct screen_ctx *sc;
|
||||
struct client_ctx *cc;
|
||||
struct client_ctx *(*iter)(struct client_ctx *) =
|
||||
reverse ? &client_mruprev : &client_mrunext;
|
||||
|
||||
/* TODO: maybe this should just be a CIRCLEQ. */
|
||||
|
||||
if (!(cc = _curcc)) {
|
||||
if (TAILQ_EMPTY(&Clientq))
|
||||
return(NULL);
|
||||
cc = TAILQ_FIRST(&Clientq);
|
||||
}
|
||||
|
||||
sc = CCTOSC(cc);
|
||||
|
||||
/* if altheld; then reset the iterator to the beginning */
|
||||
if (!sc->altpersist || sc->cycle_client == NULL)
|
||||
sc->cycle_client = TAILQ_FIRST(&sc->mruq);
|
||||
|
||||
Reference in New Issue
Block a user