From 4b339afeffe5ce7c19c1c9ea0217b45b386708d1 Mon Sep 17 00:00:00 2001 From: okan Date: Mon, 20 Jan 2014 22:31:53 +0000 Subject: Use argument to pass down flags for mousefunc cyclegroup; removes rcyclegroup wrapper need - now similar to kbfunc. --- calmwm.h | 4 +--- conf.c | 9 +++++---- mousefunc.c | 10 ++-------- 3 files changed, 8 insertions(+), 15 deletions(-) diff --git a/calmwm.h b/calmwm.h index 5fcdc37..74a5817 100644 --- a/calmwm.h +++ b/calmwm.h @@ -15,7 +15,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $OpenBSD: calmwm.h,v 1.243 2014/01/20 21:34:32 okan Exp $ + * $OpenBSD: calmwm.h,v 1.244 2014/01/20 22:31:53 okan Exp $ */ #ifndef _CALMWM_H_ @@ -495,8 +495,6 @@ void mousefunc_client_move(struct client_ctx *, union arg *); void mousefunc_client_raise(struct client_ctx *, union arg *); -void mousefunc_client_rcyclegroup(struct client_ctx *, - union arg *); void mousefunc_client_resize(struct client_ctx *, union arg *); void mousefunc_menu_cmd(struct client_ctx *, union arg *); diff --git a/conf.c b/conf.c index efffc13..27d65f1 100644 --- a/conf.c +++ b/conf.c @@ -15,7 +15,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $OpenBSD: conf.c,v 1.157 2014/01/20 21:34:32 okan Exp $ + * $OpenBSD: conf.c,v 1.158 2014/01/20 22:31:53 okan Exp $ */ #include @@ -549,9 +549,10 @@ static struct { { "window_lower", mousefunc_client_lower, MOUSEBIND_CTX_WIN, {0} }, { "window_raise", mousefunc_client_raise, MOUSEBIND_CTX_WIN, {0} }, { "window_hide", mousefunc_client_hide, MOUSEBIND_CTX_WIN, {0} }, - { "cyclegroup", mousefunc_client_cyclegroup, MOUSEBIND_CTX_ROOT, {0} }, - { "rcyclegroup", mousefunc_client_rcyclegroup, - MOUSEBIND_CTX_ROOT, {0} }, + { "cyclegroup", mousefunc_client_cyclegroup, + MOUSEBIND_CTX_ROOT, {.i = CWM_CYCLE} }, + { "rcyclegroup", mousefunc_client_cyclegroup, + MOUSEBIND_CTX_ROOT, {.i = CWM_RCYCLE} }, { "menu_group", mousefunc_menu_group, MOUSEBIND_CTX_ROOT, {0} }, { "menu_unhide", mousefunc_menu_unhide, MOUSEBIND_CTX_ROOT, {0} }, { "menu_cmd", mousefunc_menu_cmd, MOUSEBIND_CTX_ROOT, {0} }, diff --git a/mousefunc.c b/mousefunc.c index fc43994..4a98295 100644 --- a/mousefunc.c +++ b/mousefunc.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: mousefunc.c,v 1.67 2014/01/20 21:34:32 okan Exp $ + * $OpenBSD: mousefunc.c,v 1.68 2014/01/20 22:31:53 okan Exp $ */ #include @@ -200,13 +200,7 @@ mousefunc_client_hide(struct client_ctx *cc, union arg *arg) void mousefunc_client_cyclegroup(struct client_ctx *cc, union arg *arg) { - group_cycle(cc->sc, CWM_CYCLE); -} - -void -mousefunc_client_rcyclegroup(struct client_ctx *cc, union arg *arg) -{ - group_cycle(cc->sc, CWM_RCYCLE); + group_cycle(cc->sc, arg->i); } void -- cgit v1.2.3-2-gb3c3