From 27c011d4ee4c3955eb24315a53d3e46b6b5a7467 Mon Sep 17 00:00:00 2001 From: Michael Weber Date: Wed, 8 May 2013 11:37:11 +0200 Subject: [PATCH] adapt to renumbered groups --- group.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/group.c b/group.c index 6994491..533268b 100644 --- a/group.c +++ b/group.c @@ -261,7 +261,9 @@ group_hidetoggle(struct screen_ctx *sc, int idx) if ( TAILQ_EMPTY(&gc->clients) ) { struct autostartcmd *as; TAILQ_FOREACH(as, &Conf.autostartq, entry) { - if ( as->num == idx + 1 ) { + debug("idx=%i, as->num=%i, as->cmd=%s\n", + idx, as->num, as->cmd); + if ( as->num == idx ) { time_t now = time(NULL); if (as->lasttime < now - 5) { debug("run %s\n", as->cmd);