diff options
-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 |