summary refs log tree commit diff
diff options
context:
space:
mode:
authorokan <okan>2008-05-19 18:07:53 +0000
committerokan <okan>2008-05-19 18:07:53 +0000
commit53116c4ec3792901d7ac774199963d915ea0da5a (patch)
tree150e382a194b6cc4a6b809a45bd808a0d4a5c75b
parent981c2480dbeba34162711766a3b258421fe88ff8 (diff)
downloadcwm-53116c4ec3792901d7ac774199963d915ea0da5a.tar.gz
cwm-53116c4ec3792901d7ac774199963d915ea0da5a.tar.xz
cwm-53116c4ec3792901d7ac774199963d915ea0da5a.zip
stop normalizing search input; searching and matching are still
case-insensitive.  since this was the only use of normalizing input,
simplify as well.

allows one to exec with mixed case unmatched commands.

"works for me" oga@
-rw-r--r--calmwm.h2
-rw-r--r--grab.c2
-rw-r--r--input.c5
-rw-r--r--search.c2
4 files changed, 4 insertions, 7 deletions
diff --git a/calmwm.h b/calmwm.h
index 891760e..fa49d6c 100644
--- a/calmwm.h
+++ b/calmwm.h
@@ -310,7 +310,7 @@ struct mwm_hints {
 #define	MWM_DECOR_BORDER	(1 << 1)
 
 int			 input_keycodetrans(KeyCode, u_int, enum ctltype *,
-			     char *, int);
+			     char *);
 
 int			 x_errorhandler(Display *, XErrorEvent *);
 void			 x_setup(char *display_name);
diff --git a/grab.c b/grab.c
index 3aeffc6..6f0e56a 100644
--- a/grab.c
+++ b/grab.c
@@ -301,7 +301,7 @@ grab_label(struct client_ctx *cc)
 		switch (e.type) {
 		case KeyPress:
 			if (input_keycodetrans(e.xkey.keycode, e.xkey.state,
-			    &ctl, &chr, 0) < 0)
+			    &ctl, &chr) < 0)
 				continue;
 
 			switch (ctl) {
diff --git a/input.c b/input.c
index e5a4a00..8d1649c 100644
--- a/input.c
+++ b/input.c
@@ -22,8 +22,7 @@
 #include "calmwm.h"
 
 int
-input_keycodetrans(KeyCode kc, u_int state,
-    enum ctltype *ctl, char *chr, int normalize)
+input_keycodetrans(KeyCode kc, u_int state, enum ctltype *ctl, char *chr)
 {
 	int ks;
 
@@ -107,8 +106,6 @@ input_keycodetrans(KeyCode kc, u_int state,
 		return (-1);
 
 	*chr = (char)ks;
-	if (normalize)
-		*chr = tolower(*chr);
 
 	return (0);
 }
diff --git a/search.c b/search.c
index d507fbf..15e7e64 100644
--- a/search.c
+++ b/search.c
@@ -104,7 +104,7 @@ search_start(struct menu_q *menuq,
 		switch (e.type) {
 		case KeyPress:
 			if (input_keycodetrans(e.xkey.keycode, e.xkey.state,
-			    &ctl, &chr, 1) < 0)
+			    &ctl, &chr) < 0)
 				continue;
 
 			switch (ctl) {