diff options
author | Okan Demirmen <okan@cvs.openbsd.org> | 2013-01-13 13:55:13 +0000 |
---|---|---|
committer | Okan Demirmen <okan@cvs.openbsd.org> | 2013-01-13 13:55:13 +0000 |
commit | f3a4a8c19c7a0dca53709d56fd4e8d9941949bb3 (patch) | |
tree | 3d5f37b54c6e5825337adcf20c47c977503979c8 | |
parent | 04cd7a6aa4e611f888edbb008ffc0a91cf74dd66 (diff) |
put back r1.68 which allows an empty group to be sticky; behavior
change noticed by Thomas Pfaff and diagnosis why we need to
group_setactive in this case by Alexander Polakov. replace XXX with
a useful comment.
-rw-r--r-- | app/cwm/group.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/app/cwm/group.c b/app/cwm/group.c index 5a75bff74..8cde00519 100644 --- a/app/cwm/group.c +++ b/app/cwm/group.c @@ -16,7 +16,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $OpenBSD: group.c,v 1.69 2013/01/10 15:28:11 okan Exp $ + * $OpenBSD: group.c,v 1.70 2013/01/13 13:55:12 okan Exp $ */ #include <sys/param.h> @@ -269,8 +269,12 @@ group_hidetoggle(struct screen_ctx *sc, int idx) if (gc->hidden) group_show(sc, gc); - else + else { group_hide(sc, gc); + /* make clients stick to empty group */ + if (TAILQ_EMPTY(&gc->clients)) + group_setactive(sc, idx); + } } void |