about summary refs log tree commit diff
path: root/group.c
diff options
context:
space:
mode:
authorokan <okan>2016-09-14 21:00:24 +0000
committerokan <okan>2016-09-14 21:00:24 +0000
commit8d44e4b3e834663253dee110e98f8284b3092afc (patch)
tree5b2391ec89dd9f394bacdc01c64b89147cea817d /group.c
parentd2616ce3971c0fe8c7f6fa7a73dc5bbe3332ae4a (diff)
parent2bbe111cc0e2ddd8b684e22dab337086c39ac46a (diff)
downloadcwm-8d44e4b3e834663253dee110e98f8284b3092afc.tar.gz
cwm-8d44e4b3e834663253dee110e98f8284b3092afc.tar.xz
cwm-8d44e4b3e834663253dee110e98f8284b3092afc.zip
cvsimport
* refs/heads/master:
  Some clients fail to setup hints at all, so initalize for them; fallout from r1.218 switching to malloc - clearly missed this case.
  Fix-up a few simple uses of client_current(): check CLIENT_ACTIVE flag instead of relying on curcc.
  init label
  Limit mouse resize to hints within the client; matches kbd resize behaviour.
  Switch to just malloc since we need initialize most everything anyway.
  change 'sticky' to 'stick' to toggle client stickiness (seems the default binding worked for everyone for a long time!); conflict with group sticky found by Ali Farzanrad - thanks!
  Simplify group_holds_only_hidden(); from Vadim Vygonets.
  Simplify toggling flags; from Vadim Vygonets.
  Do not draw borders on ignored clients when returning from fullscreen; from Vadim Vygonets.
  Remove redundant minimum client size adjustment (minw and minh are always positive since r1.214); from Vadim Vygonets.
Diffstat (limited to 'group.c')
-rw-r--r--group.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/group.c b/group.c
index b5c1c34..69d4b92 100644
--- a/group.c
+++ b/group.c
@@ -209,19 +209,12 @@ int
 group_holds_only_hidden(struct group_ctx *gc)
 {
 	struct client_ctx	*cc;
-	int			 hidden = 0, same = 0;
 
 	TAILQ_FOREACH(cc, &gc->clientq, group_entry) {
-		if (cc->flags & CLIENT_STICKY)
-			continue;
-		if (hidden == ((cc->flags & CLIENT_HIDDEN) ? 1 : 0))
-			same++;
+		if (!(cc->flags & (CLIENT_HIDDEN | CLIENT_STICKY)))
+			return(0);
 	}
-
-	if (same == 0)
-		hidden = !hidden;
-
-	return(hidden);
+	return(1);
 }
 
 void