aboutsummaryrefslogtreecommitdiffstats
path: root/group.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--group.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/group.c b/group.c
index ffe6b5f..fb7b7b7 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.
*
- * $Id: group.c,v 1.23 2009/01/27 00:42:53 oga Exp $
+ * $Id: group.c,v 1.24 2009/05/14 16:24:04 oga Exp $
*/
#include "headers.h"
@@ -213,6 +213,23 @@ group_hidetoggle(int idx)
}
}
+void
+group_only(int idx)
+{
+ int i;
+
+ if (idx < 0 || idx >= CALMWM_NGROUPS)
+ err(1, "group_only: index out of range (%d)", idx);
+
+ for (i = 0; i < CALMWM_NGROUPS; i++) {
+ if (i == idx) {
+ _group_show(&Groups[i]);
+ } else {
+ _group_hide(&Groups[i]);
+ }
+ }
+}
+
/*
* Cycle through active groups. If none exist, then just stay put.
*/