mirror of
https://github.com/leahneukirchen/cwm.git
synced 2023-08-10 21:13:12 +03:00
Simplify group_holds_only_hidden(); from Vadim Vygonets.
This commit is contained in:
parent
67a9eaa440
commit
c82c3f0835
13
group.c
13
group.c
@ -209,19 +209,12 @@ int
|
|||||||
group_holds_only_hidden(struct group_ctx *gc)
|
group_holds_only_hidden(struct group_ctx *gc)
|
||||||
{
|
{
|
||||||
struct client_ctx *cc;
|
struct client_ctx *cc;
|
||||||
int hidden = 0, same = 0;
|
|
||||||
|
|
||||||
TAILQ_FOREACH(cc, &gc->clientq, group_entry) {
|
TAILQ_FOREACH(cc, &gc->clientq, group_entry) {
|
||||||
if (cc->flags & CLIENT_STICKY)
|
if (!(cc->flags & (CLIENT_HIDDEN | CLIENT_STICKY)))
|
||||||
continue;
|
return(0);
|
||||||
if (hidden == ((cc->flags & CLIENT_HIDDEN) ? 1 : 0))
|
|
||||||
same++;
|
|
||||||
}
|
}
|
||||||
|
return(1);
|
||||||
if (same == 0)
|
|
||||||
hidden = !hidden;
|
|
||||||
|
|
||||||
return(hidden);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
Loading…
Reference in New Issue
Block a user