diff options
author | Okan Demirmen <okan@cvs.openbsd.org> | 2013-07-08 18:39:21 +0000 |
---|---|---|
committer | Okan Demirmen <okan@cvs.openbsd.org> | 2013-07-08 18:39:21 +0000 |
commit | 78fdbbe3616f2272381d4c6b2968febe387c2c0e (patch) | |
tree | 3ea09427971198bd75b9e457704c44cbef87e787 /app | |
parent | f6ffd81276f31f2bd3c111ff62a876dd219e7659 (diff) |
add support for mouse based group {,r}cycle; from Rodrigo Mosconi. not
bound by default.
Diffstat (limited to 'app')
-rw-r--r-- | app/cwm/calmwm.h | 6 | ||||
-rw-r--r-- | app/cwm/conf.c | 4 | ||||
-rw-r--r-- | app/cwm/cwmrc.5 | 8 | ||||
-rw-r--r-- | app/cwm/mousefunc.c | 14 |
4 files changed, 27 insertions, 5 deletions
diff --git a/app/cwm/calmwm.h b/app/cwm/calmwm.h index c3a68d9e0..d5bf6dafa 100644 --- a/app/cwm/calmwm.h +++ b/app/cwm/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.215 2013/07/08 18:19:22 okan Exp $ + * $OpenBSD: calmwm.h,v 1.216 2013/07/08 18:39:20 okan Exp $ */ #ifndef _CALMWM_H_ @@ -424,12 +424,16 @@ void kbfunc_ssh(struct client_ctx *, union arg *); void kbfunc_term(struct client_ctx *, union arg *); void kbfunc_tile(struct client_ctx *, union arg *); +void mousefunc_client_cyclegroup(struct client_ctx *, + void *); void mousefunc_client_grouptoggle(struct client_ctx *, void *); void mousefunc_client_hide(struct client_ctx *, void *); void mousefunc_client_lower(struct client_ctx *, void *); void mousefunc_client_move(struct client_ctx *, void *); void mousefunc_client_raise(struct client_ctx *, void *); +void mousefunc_client_rcyclegroup(struct client_ctx *, + void *); void mousefunc_client_resize(struct client_ctx *, void *); void mousefunc_menu_cmd(struct client_ctx *, void *); void mousefunc_menu_group(struct client_ctx *, void *); diff --git a/app/cwm/conf.c b/app/cwm/conf.c index cdb797204..5da4a1327 100644 --- a/app/cwm/conf.c +++ b/app/cwm/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.140 2013/07/08 18:19:22 okan Exp $ + * $OpenBSD: conf.c,v 1.141 2013/07/08 18:39:20 okan Exp $ */ #include <sys/param.h> @@ -550,6 +550,8 @@ static struct { { "window_lower", mousefunc_client_lower, MOUSEBIND_CTX_WIN }, { "window_raise", mousefunc_client_raise, MOUSEBIND_CTX_WIN }, { "window_hide", mousefunc_client_hide, MOUSEBIND_CTX_WIN }, + { "cyclegroup", mousefunc_client_cyclegroup, MOUSEBIND_CTX_ROOT }, + { "rcyclegroup", mousefunc_client_rcyclegroup, MOUSEBIND_CTX_ROOT }, { "menu_group", mousefunc_menu_group, MOUSEBIND_CTX_ROOT }, { "menu_unhide", mousefunc_menu_unhide, MOUSEBIND_CTX_ROOT }, { "menu_cmd", mousefunc_menu_cmd, MOUSEBIND_CTX_ROOT }, diff --git a/app/cwm/cwmrc.5 b/app/cwm/cwmrc.5 index 5f86fcc91..6d4684ffa 100644 --- a/app/cwm/cwmrc.5 +++ b/app/cwm/cwmrc.5 @@ -1,4 +1,4 @@ -.\" $OpenBSD: cwmrc.5,v 1.53 2013/06/17 00:57:47 okan Exp $ +.\" $OpenBSD: cwmrc.5,v 1.54 2013/07/08 18:39:20 okan Exp $ .\" .\" Copyright (c) 2004,2005 Marius Aamodt Eriksen <marius@monkey.org> .\" @@ -14,7 +14,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: June 17 2013 $ +.Dd $Mdocdate: July 8 2013 $ .Dt CWMRC 5 .Os .Sh NAME @@ -463,6 +463,10 @@ Raise current window. Hide current window. .It window_grouptoggle Toggle group membership of current window. +.It cyclegroup +Forward cycle through groups. +.It rcyclegroup +Reverse cycle through groups. .It menu_group Launch group list. .It menu_unhide diff --git a/app/cwm/mousefunc.c b/app/cwm/mousefunc.c index c44c3fcc7..366ad9e90 100644 --- a/app/cwm/mousefunc.c +++ b/app/cwm/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.54 2013/07/08 18:19:22 okan Exp $ + * $OpenBSD: mousefunc.c,v 1.55 2013/07/08 18:39:20 okan Exp $ */ #include <sys/param.h> @@ -202,6 +202,18 @@ mousefunc_client_hide(struct client_ctx *cc, void *arg) } void +mousefunc_client_cyclegroup(struct client_ctx *cc, void *arg) +{ + group_cycle(cc->sc, CWM_CYCLE); +} + +void +mousefunc_client_rcyclegroup(struct client_ctx *cc, void *arg) +{ + group_cycle(cc->sc, CWM_RCYCLE); +} + +void mousefunc_menu_group(struct client_ctx *cc, void *arg) { group_menu(arg); |