mirror of https://github.com/0intro/wmii
[menu] Fix numeric keypad input. Closes issue #213.
This commit is contained in:
parent
05053cb995
commit
26bd6db557
|
@ -82,7 +82,10 @@ history_dump(const char *path, int max) {
|
|||
Binit(&b, fd, OWRITE);
|
||||
hist.next = nil;
|
||||
for(h=first; h; h=h->next)
|
||||
Bprint(&b, "%s\n", h->string);
|
||||
if(Bprint(&b, "%s\n", h->string) < 0) {
|
||||
unlink(tmp);
|
||||
exit(1);
|
||||
}
|
||||
Bterm(&b);
|
||||
rename(tmp, path);
|
||||
exit(0);
|
||||
|
|
|
@ -265,8 +265,9 @@ kdown_event(Window *w, void *aux, XKeyEvent *e) {
|
|||
int num;
|
||||
KeySym ksym;
|
||||
|
||||
buf[0] = 0;
|
||||
buf[0] = '\0';
|
||||
num = XLookupString(e, buf, sizeof buf, &ksym, 0);
|
||||
buf[num] = '\0';
|
||||
key = XKeysymToString(ksym);
|
||||
if(IsKeypadKey(ksym))
|
||||
if(ksym == XK_KP_Enter)
|
||||
|
|
|
@ -907,13 +907,12 @@ msg_nudge(View *v, IxpMsg *m) {
|
|||
void
|
||||
msg_parsecolors(IxpMsg *m, CTuple *col) {
|
||||
CTuple tpl;
|
||||
static char Ebad[] = "bad color string";
|
||||
char n;
|
||||
|
||||
n = loadcolor(&tpl, m->pos, m->end);
|
||||
m->pos += n;
|
||||
if(n == 0 || msg_getword(m, nil))
|
||||
error(Ebad);
|
||||
error("bad color string");
|
||||
*col = tpl;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue