summary refs log tree commit diff
diff options
context:
space:
mode:
authorokan <okan>2011-06-24 06:09:26 +0000
committerokan <okan>2011-06-24 06:09:26 +0000
commit8f1c5833613687e67c8422bd50c34b4d11fa2e6c (patch)
tree17be3dacc2f50d4aa78496a7fa66ae23c9a78c2a
parent34ba6cdbcc03111d75e2336739aa70edc7da5a1d (diff)
downloadcwm-8f1c5833613687e67c8422bd50c34b4d11fa2e6c.tar.gz
cwm-8f1c5833613687e67c8422bd50c34b4d11fa2e6c.tar.xz
cwm-8f1c5833613687e67c8422bd50c34b4d11fa2e6c.zip
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@
-rw-r--r--calmwm.h1
-rw-r--r--conf.c1
-rw-r--r--cwmrc.54
-rw-r--r--mousefunc.c6
4 files changed, 11 insertions, 1 deletions
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
@@ -197,6 +197,12 @@ mousefunc_window_lower(struct client_ctx *cc, void *arg)
 }
 
 void
+mousefunc_window_raise(struct client_ctx *cc, void *arg)
+{
+	client_raise(cc);
+}
+
+void
 mousefunc_window_hide(struct client_ctx *cc, void *arg)
 {
 	client_hide(cc);