aboutsummaryrefslogtreecommitdiffstats
path: root/group.c
diff options
context:
space:
mode:
authorokan2013-01-13 13:55:12 +0000
committerokan2013-01-13 13:55:12 +0000
commita4a4ae00216838145c05fd84c5900fdc8867c99c (patch)
treea5335adb6aa095b707d309dffa716d63bff868f6 /group.c
parentcc9f2b88e76876e789962de22f3996dcc31b41b6 (diff)
downloadcwm-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 'group.c')
-rw-r--r--group.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/group.c b/group.c
index 5a75bff..8cde005 100644
--- a/group.c
+++ b/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