From 19dcbc5717bdcef4bcb5be6966be7d86f88152d6 Mon Sep 17 00:00:00 2001 From: arg@mig29 Date: Mon, 27 Nov 2006 17:49:58 +0100 Subject: returning to old Key struct --- event.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'event.c') diff --git a/event.c b/event.c index 45a21a6..edfcc52 100644 --- a/event.c +++ b/event.c @@ -11,7 +11,7 @@ typedef struct { unsigned long mod; KeySym keysym; - void (*func[NFUNCS])(Arg *arg); + void (*func)(Arg *arg); Arg arg; } Key; @@ -245,7 +245,7 @@ expose(XEvent *e) { static void keypress(XEvent *e) { static unsigned int len = sizeof key / sizeof key[0]; - unsigned int i, j; + unsigned int i; KeySym keysym; XKeyEvent *ev = &e->xkey; @@ -254,9 +254,8 @@ keypress(XEvent *e) { if(keysym == key[i].keysym && CLEANMASK(key[i].mod) == CLEANMASK(ev->state)) { - for(j = 0; j < NFUNCS; j++) - if(key[i].func[j]) - key[i].func[j](&key[i].arg); + if(key[i].func) + key[i].func(&key[i].arg); return; } } -- cgit v1.2.3