mirror of
https://github.com/leahneukirchen/cwm.git
synced 2023-08-10 21:13:12 +03:00
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@
This commit is contained in:
parent
981c2480db
commit
53116c4ec3
2
calmwm.h
2
calmwm.h
@ -310,7 +310,7 @@ struct mwm_hints {
|
|||||||
#define MWM_DECOR_BORDER (1 << 1)
|
#define MWM_DECOR_BORDER (1 << 1)
|
||||||
|
|
||||||
int input_keycodetrans(KeyCode, u_int, enum ctltype *,
|
int input_keycodetrans(KeyCode, u_int, enum ctltype *,
|
||||||
char *, int);
|
char *);
|
||||||
|
|
||||||
int x_errorhandler(Display *, XErrorEvent *);
|
int x_errorhandler(Display *, XErrorEvent *);
|
||||||
void x_setup(char *display_name);
|
void x_setup(char *display_name);
|
||||||
|
2
grab.c
2
grab.c
@ -301,7 +301,7 @@ grab_label(struct client_ctx *cc)
|
|||||||
switch (e.type) {
|
switch (e.type) {
|
||||||
case KeyPress:
|
case KeyPress:
|
||||||
if (input_keycodetrans(e.xkey.keycode, e.xkey.state,
|
if (input_keycodetrans(e.xkey.keycode, e.xkey.state,
|
||||||
&ctl, &chr, 0) < 0)
|
&ctl, &chr) < 0)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
switch (ctl) {
|
switch (ctl) {
|
||||||
|
5
input.c
5
input.c
@ -22,8 +22,7 @@
|
|||||||
#include "calmwm.h"
|
#include "calmwm.h"
|
||||||
|
|
||||||
int
|
int
|
||||||
input_keycodetrans(KeyCode kc, u_int state,
|
input_keycodetrans(KeyCode kc, u_int state, enum ctltype *ctl, char *chr)
|
||||||
enum ctltype *ctl, char *chr, int normalize)
|
|
||||||
{
|
{
|
||||||
int ks;
|
int ks;
|
||||||
|
|
||||||
@ -107,8 +106,6 @@ input_keycodetrans(KeyCode kc, u_int state,
|
|||||||
return (-1);
|
return (-1);
|
||||||
|
|
||||||
*chr = (char)ks;
|
*chr = (char)ks;
|
||||||
if (normalize)
|
|
||||||
*chr = tolower(*chr);
|
|
||||||
|
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
2
search.c
2
search.c
@ -104,7 +104,7 @@ search_start(struct menu_q *menuq,
|
|||||||
switch (e.type) {
|
switch (e.type) {
|
||||||
case KeyPress:
|
case KeyPress:
|
||||||
if (input_keycodetrans(e.xkey.keycode, e.xkey.state,
|
if (input_keycodetrans(e.xkey.keycode, e.xkey.state,
|
||||||
&ctl, &chr, 1) < 0)
|
&ctl, &chr) < 0)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
switch (ctl) {
|
switch (ctl) {
|
||||||
|
Loading…
Reference in New Issue
Block a user