[event] Fix handling of keysym/keycode in event_handle_keypress.

Only compare the configured one of these two properties for any
given key.

Signed-off-by: Jan Niehusmann <jan@gondor.com>
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Jan Niehusmann 2008-05-02 13:53:16 +02:00 committed by Julien Danjou
parent 6623668b6f
commit 78dd0b8620
1 changed files with 1 additions and 1 deletions

View File

@ -353,7 +353,7 @@ event_handle_keypress(XEvent *e)
keysym = XKeycodeToKeysym(globalconf.display, (KeyCode) ev->keycode, 0);
for(k = globalconf.keys; k; k = k->next)
if((ev->keycode == k->keycode || keysym == k->keysym) &&
if(((k->keycode && ev->keycode == k->keycode) || (k->keysym && keysym == k->keysym)) &&
k->func && CLEANMASK(k->mod) == CLEANMASK(ev->state))
k->func(screen, k->arg);
}