From: garbeam@gmail.com Date: Sat, 29 Oct 2011 08:59:34 +0000 (+0200) Subject: added 20h's patch of 8 Sep 2011 to surf, thanks X-Git-Url: https://git.danieliu.xyz/?a=commitdiff_plain;h=3b104416d350f25db098d6c8dc9ddff11311e065;p=surf.git added 20h's patch of 8 Sep 2011 to surf, thanks --- diff --git a/surf.c b/surf.c index 6dc32ea..85155b5 100644 --- a/surf.c +++ b/surf.c @@ -21,7 +21,6 @@ #include #define LENGTH(x) (sizeof x / sizeof x[0]) -#define CLEANMASK(mask) (mask & ~(GDK_MOD2_MASK)) enum { AtomFind, AtomGo, AtomUri, AtomLast }; @@ -345,7 +344,7 @@ keypress(GtkWidget* w, GdkEventKey *ev, Client *c) { updatewinid(c); for(i = 0; i < LENGTH(keys); i++) { if(gdk_keyval_to_lower(ev->keyval) == keys[i].keyval - && CLEANMASK(ev->state) == keys[i].mod + && (ev->state & keys[i].mod) == keys[i].mod && keys[i].func) { keys[i].func(c, &(keys[i].arg)); processed = TRUE;