aewl
diff event.c @ 589:732c58a3d92d
returning to old Key struct
author | arg@mig29 |
---|---|
date | Mon, 27 Nov 2006 17:49:58 +0100 |
parents | c2ddd15b199e |
children | d6ff27532fdd |
line diff
1.1 --- a/event.c Mon Nov 27 17:46:02 2006 +0100 1.2 +++ b/event.c Mon Nov 27 17:49:58 2006 +0100 1.3 @@ -11,7 +11,7 @@ 1.4 typedef struct { 1.5 unsigned long mod; 1.6 KeySym keysym; 1.7 - void (*func[NFUNCS])(Arg *arg); 1.8 + void (*func)(Arg *arg); 1.9 Arg arg; 1.10 } Key; 1.11 1.12 @@ -245,7 +245,7 @@ 1.13 static void 1.14 keypress(XEvent *e) { 1.15 static unsigned int len = sizeof key / sizeof key[0]; 1.16 - unsigned int i, j; 1.17 + unsigned int i; 1.18 KeySym keysym; 1.19 XKeyEvent *ev = &e->xkey; 1.20 1.21 @@ -254,9 +254,8 @@ 1.22 if(keysym == key[i].keysym 1.23 && CLEANMASK(key[i].mod) == CLEANMASK(ev->state)) 1.24 { 1.25 - for(j = 0; j < NFUNCS; j++) 1.26 - if(key[i].func[j]) 1.27 - key[i].func[j](&key[i].arg); 1.28 + if(key[i].func) 1.29 + key[i].func(&key[i].arg); 1.30 return; 1.31 } 1.32 }