From 8f1c5833613687e67c8422bd50c34b4d11fa2e6c Mon Sep 17 00:00:00 2001 From: okan Date: Fri, 24 Jun 2011 06:09:26 +0000 Subject: [PATCH] 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 | 1 + conf.c | 1 + cwmrc.5 | 4 +++- mousefunc.c | 6 ++++++ 4 files changed, 11 insertions(+), 1 deletion(-) diff --git a/calmwm.h b/calmwm.h index 68426ac..168577b 100644 --- a/calmwm.h +++ b/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 4d97f94..f5588bc 100644 --- a/conf.c +++ b/conf.c @@ -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 b5a5779..4c0daaf 100644 --- a/cwmrc.5 +++ b/cwmrc.5 @@ -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: May 7 2011 $ +.Dd $Mdocdate: June 24 2011 $ .Dt CWMRC 5 .Os .Sh NAME @@ -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 d287d8b..4d39fa9 100644 --- a/mousefunc.c +++ b/mousefunc.c @@ -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) {