diff options
author | okan <okan> | 2011-09-19 07:23:03 +0000 |
---|---|---|
committer | okan <okan> | 2011-09-19 07:23:03 +0000 |
commit | ba3dfcf7bdd993e2a2bed8e55a3ea904f67e234f (patch) | |
tree | 2e5ba43b23310bb910fd69101ba445fe7f9998ea /group.c | |
parent | 22f366830e6fc06931f9e0a905e6c34fab0f7a20 (diff) | |
download | cwm-ba3dfcf7bdd993e2a2bed8e55a3ea904f67e234f.tar.gz cwm-ba3dfcf7bdd993e2a2bed8e55a3ea904f67e234f.tar.xz cwm-ba3dfcf7bdd993e2a2bed8e55a3ea904f67e234f.zip |
move client to group (movetogroup) and hide client only if group is
already hidden (suggested behavior from Alexander Polakov). ok sthen oga
Diffstat (limited to 'group.c')
-rw-r--r-- | group.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/group.c b/group.c index 877a824..4fce08c 100644 --- a/group.c +++ b/group.c @@ -216,12 +216,16 @@ void group_movetogroup(struct client_ctx *cc, int idx) { struct screen_ctx *sc = cc->sc; + struct group_ctx *gc; if (idx < 0 || idx >= CALMWM_NGROUPS) err(1, "group_movetogroup: index out of range (%d)", idx); - if(sc->group_active != &sc->groups[idx]) + gc = &sc->groups[idx]; + if (gc->hidden) { client_hide(cc); + gc->nhidden++; + } group_add(&sc->groups[idx], cc); } |