From feff015aa1ac96d5c2ef8cc9b6413f4aa8ed2b8a Mon Sep 17 00:00:00 2001 From: okan Date: Fri, 24 Jun 2011 06:09:26 +0000 Subject: New option to raise a client via the mouse (unbound by default); opposing action, lower, already exists and bound. Both keyboard mappings already exist. 'no opinion either way' oga@ --- calmwm.h | 3 ++- conf.c | 3 ++- cwmrc.5 | 4 +++- mousefunc.c | 8 +++++++- 4 files changed, 14 insertions(+), 4 deletions(-) diff --git a/calmwm.h b/calmwm.h index 75ef1df..bb6aa86 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.131 2011/06/24 06:06:24 okan Exp $ + * $OpenBSD: calmwm.h,v 1.132 2011/06/24 06:09:26 okan Exp $ */ #ifndef _CALMWM_H_ @@ -405,6 +405,7 @@ void mousefunc_window_grouptoggle(struct client_ctx *, void mousefunc_window_hide(struct client_ctx *, void *); void mousefunc_window_lower(struct client_ctx *, void *); void mousefunc_window_move(struct client_ctx *, void *); +void mousefunc_window_raise(struct client_ctx *, void *); void mousefunc_window_resize(struct client_ctx *, void *); struct menu *menu_filter(struct screen_ctx *, struct menu_q *, diff --git a/conf.c b/conf.c index db40051..a87ef8d 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.84 2011/06/24 06:06:24 okan Exp $ + * $OpenBSD: conf.c,v 1.85 2011/06/24 06:09:26 okan Exp $ */ #include @@ -554,6 +554,7 @@ static struct { { "window_grouptoggle", mousefunc_window_grouptoggle, MOUSEBIND_CTX_WIN }, { "window_lower", mousefunc_window_lower, MOUSEBIND_CTX_WIN }, + { "window_raise", mousefunc_window_raise, MOUSEBIND_CTX_WIN }, { "window_hide", mousefunc_window_hide, MOUSEBIND_CTX_WIN }, { "menu_group", mousefunc_menu_group, MOUSEBIND_CTX_ROOT }, { "menu_unhide", mousefunc_menu_unhide, MOUSEBIND_CTX_ROOT }, diff --git a/cwmrc.5 b/cwmrc.5 index 1d8b64b..24f3e52 100644 --- a/cwmrc.5 +++ b/cwmrc.5 @@ -1,4 +1,4 @@ -.\" $OpenBSD: cwmrc.5,v 1.36 2011/06/24 06:06:24 okan Exp $ +.\" $OpenBSD: cwmrc.5,v 1.37 2011/06/24 06:09:26 okan Exp $ .\" .\" Copyright (c) 2004,2005 Marius Aamodt Eriksen .\" @@ -402,6 +402,8 @@ Move current window. Resize current window. .It window_lower Lower current window. +.It window_raise +Raise current window. .It window_hide Hide current window. .It window_grouptoggle diff --git a/mousefunc.c b/mousefunc.c index e38873e..c296d75 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.29 2011/06/24 06:06:24 okan Exp $ + * $OpenBSD: mousefunc.c,v 1.30 2011/06/24 06:09:26 okan Exp $ */ #include @@ -196,6 +196,12 @@ mousefunc_window_lower(struct client_ctx *cc, void *arg) client_lower(cc); } +void +mousefunc_window_raise(struct client_ctx *cc, void *arg) +{ + client_raise(cc); +} + void mousefunc_window_hide(struct client_ctx *cc, void *arg) { -- cgit v1.2.3-2-gb3c3