diff options
author | okan <okan> | 2013-04-14 16:13:17 +0000 |
---|---|---|
committer | okan <okan> | 2013-04-14 16:13:17 +0000 |
commit | 6f185bb03c3ba0928ba6254485c710103379bd1a (patch) | |
tree | a1ad2c61058ca193942a4a00757ff25bd7c9a784 /group.c | |
parent | a957ed7c7dcc287afcf33547326717701a0445de (diff) | |
parent | 16ed8bf8e4f561049b732b326f3d0ee475fe13f6 (diff) | |
download | cwm-6f185bb03c3ba0928ba6254485c710103379bd1a.tar.gz cwm-6f185bb03c3ba0928ba6254485c710103379bd1a.tar.xz cwm-6f185bb03c3ba0928ba6254485c710103379bd1a.zip |
cvsimport
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); } |