diff options
Diffstat (limited to 'group.c')
-rw-r--r-- | group.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/group.c b/group.c index 3b21c68..34d0465 100644 --- a/group.c +++ b/group.c @@ -351,6 +351,7 @@ group_menu(XButtonEvent *e) int i; sc = screen_fromroot(e->root); + TAILQ_INIT(&menuq); for (i = 0; i < CALMWM_NGROUPS; i++) { @@ -374,15 +375,11 @@ group_menu(XButtonEvent *e) return; mi = menu_filter(sc, &menuq, NULL, NULL, 0, NULL, NULL); + if (mi != NULL && mi->ctx != NULL) { + gc = (struct group_ctx *)mi->ctx; + (gc->hidden) ? group_show(sc, gc) : group_hide(sc, gc); + } - if (mi == NULL || mi->ctx == NULL) - goto cleanup; - - gc = (struct group_ctx *)mi->ctx; - - (gc->hidden) ? group_show(sc, gc) : group_hide(sc, gc); - -cleanup: menuq_clear(&menuq); } |