summaryrefslogtreecommitdiff
path: root/event.c
diff options
context:
space:
mode:
authorAnselm R. Garbe <garbeam@gmail.com>2007-08-16 18:41:22 +0200
committerAnselm R. Garbe <garbeam@gmail.com>2007-08-16 18:41:22 +0200
commit04dec4c94390fdf57893615de5b5872dd5abbce4 (patch)
tree70baf422ae086ea7467c4550a0cfd0b9f288b4d7 /event.c
parente40448fd6340620354d82d801d975eaa53dbd924 (diff)
made plural arrays
Diffstat (limited to 'event.c')
-rw-r--r--event.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/event.c b/event.c
index 4e240e2b..b96aba99 100644
--- a/event.c
+++ b/event.c
@@ -252,18 +252,18 @@ expose(XEvent *e) {
static void
keypress(XEvent *e) {
KEYS
- unsigned int len = sizeof key / sizeof key[0];
+ unsigned int len = sizeof keys / sizeof keys[0];
unsigned int i;
KeySym keysym;
XKeyEvent *ev = &e->xkey;
keysym = XKeycodeToKeysym(dpy, (KeyCode)ev->keycode, 0);
for(i = 0; i < len; i++)
- if(keysym == key[i].keysym
- && CLEANMASK(key[i].mod) == CLEANMASK(ev->state))
+ if(keysym == keys[i].keysym
+ && CLEANMASK(keys[i].mod) == CLEANMASK(ev->state))
{
- if(key[i].func)
- key[i].func(key[i].arg);
+ if(keys[i].func)
+ keys[i].func(keys[i].arg);
}
}
@@ -358,20 +358,20 @@ void (*handler[LASTEvent]) (XEvent *) = {
void
grabkeys(void) {
KEYS
- unsigned int len = sizeof key / sizeof key[0];
+ unsigned int len = sizeof keys / sizeof keys[0];
unsigned int i;
KeyCode code;
XUngrabKey(dpy, AnyKey, AnyModifier, root);
for(i = 0; i < len; i++) {
- code = XKeysymToKeycode(dpy, key[i].keysym);
- XGrabKey(dpy, code, key[i].mod, root, True,
+ code = XKeysymToKeycode(dpy, keys[i].keysym);
+ XGrabKey(dpy, code, keys[i].mod, root, True,
GrabModeAsync, GrabModeAsync);
- XGrabKey(dpy, code, key[i].mod | LockMask, root, True,
+ XGrabKey(dpy, code, keys[i].mod | LockMask, root, True,
GrabModeAsync, GrabModeAsync);
- XGrabKey(dpy, code, key[i].mod | numlockmask, root, True,
+ XGrabKey(dpy, code, keys[i].mod | numlockmask, root, True,
GrabModeAsync, GrabModeAsync);
- XGrabKey(dpy, code, key[i].mod | numlockmask | LockMask, root, True,
+ XGrabKey(dpy, code, keys[i].mod | numlockmask | LockMask, root, True,
GrabModeAsync, GrabModeAsync);
}
}