about summary refs log tree commit diff
diff options
context:
space:
mode:
authorokan <okan>2013-06-17 00:57:47 +0000
committerokan <okan>2013-06-17 00:57:47 +0000
commit8b00f438bef0780a3243c68fbfbb568365504c96 (patch)
treec2e2d7b1b8f9fd8db607cca2a0a5bcf826641037
parent6059073a5fedd7ef3d97e44ea8eb1511d82087b9 (diff)
downloadcwm-8b00f438bef0780a3243c68fbfbb568365504c96.tar.gz
cwm-8b00f438bef0780a3243c68fbfbb568365504c96.tar.xz
cwm-8b00f438bef0780a3243c68fbfbb568365504c96.zip
allow mouse button4 and button5; from Rodrigo Mosconi
-rw-r--r--conf.c6
-rw-r--r--cwmrc.56
2 files changed, 9 insertions, 3 deletions
diff --git a/conf.c b/conf.c
index 763e364..6b0abe6 100644
--- a/conf.c
+++ b/conf.c
@@ -545,7 +545,9 @@ static struct {
 	{ "menu_cmd", mousefunc_menu_cmd, MOUSEBIND_CTX_ROOT },
 };
 
-static unsigned int mouse_btns[] = { Button1, Button2, Button3 };
+static unsigned int mouse_btns[] = {
+	Button1, Button2, Button3, Button4, Button5
+};
 
 int
 conf_mousebind(struct conf *c, char *name, char *binding)
@@ -571,7 +573,7 @@ conf_mousebind(struct conf *c, char *name, char *binding)
 	} else
 		substring = name;
 
-	button = strtonum(substring, 1, 3, &errstr);
+	button = strtonum(substring, 1, 5, &errstr);
 	if (errstr)
 		warnx("button number is %s: %s", errstr, substring);
 
diff --git a/cwmrc.5 b/cwmrc.5
index b475d5e..68803ad 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: December 17 2012 $
+.Dd $Mdocdate: January 8 2013 $
 .Dt CWMRC 5
 .Os
 .Sh NAME
@@ -206,6 +206,10 @@ Left mouse button.
 Middle mouse button.
 .It 3
 Right mouse button.
+.It 4
+Scroll up mouse button.
+.It 5
+Scroll down mouse button.
 .El
 .Pp
 The