diff options
author | Enno Boland (tox) <tox@s01.de> | 2009-09-07 15:43:18 +0200 |
---|---|---|
committer | Enno Boland (tox) <tox@s01.de> | 2009-09-07 15:43:18 +0200 |
commit | 38d809ce59fd4e7f041de3851be27f5a08278cf9 (patch) | |
tree | 8406d86e0b8d262f38291103c8f348b18c7b25f8 | |
parent | 4dbf90e0d7846bfdfa93564b6ec85068367f2008 (diff) | |
download | surf-38d809ce59fd4e7f041de3851be27f5a08278cf9.tar.gz surf-38d809ce59fd4e7f041de3851be27f5a08278cf9.tar.bz2 surf-38d809ce59fd4e7f041de3851be27f5a08278cf9.zip |
fixing numlock bug.
-rw-r--r-- | surf.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -17,6 +17,7 @@ #include <glib/gstdio.h> #define LENGTH(x) (sizeof x / sizeof x[0]) +#define CLEANMASK(mask) (mask & ~(GDK_MOD2_MASK)) Display *dpy; Atom urlprop; @@ -276,7 +277,8 @@ keypress(GtkWidget* w, GdkEventKey *ev, Client *c) { focus = BROWSER; for(i = 0; i < LENGTH(keys); i++) { if(focus & keys[i].focus && ev->keyval == keys[i].keyval && - (ev->state == keys[i].mod || ev->state & keys[i].mod) + (CLEANMASK(ev->state) == keys[i].mod || + CLEANMASK(ev->state) & keys[i].mod) && keys[i].func) { keys[i].func(c, &(keys[i].arg)); processed = TRUE; |