diff options
author | okan | 2013-01-13 13:55:12 +0000 |
---|---|---|
committer | okan | 2013-01-13 13:55:12 +0000 |
commit | a4a4ae00216838145c05fd84c5900fdc8867c99c (patch) | |
tree | a5335adb6aa095b707d309dffa716d63bff868f6 | |
parent | cc9f2b88e76876e789962de22f3996dcc31b41b6 (diff) | |
download | cwm-a4a4ae00216838145c05fd84c5900fdc8867c99c.tar.gz |
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.
Diffstat (limited to '')
-rw-r--r-- | group.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -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 |