added 20h's patch of 8 Sep 2011 to surf, thanks

This commit is contained in:
garbeam@gmail.com 2011-10-29 10:59:34 +02:00
parent 62f54a3745
commit 3b104416d3
1 changed files with 1 additions and 2 deletions

3
surf.c
View File

@ -21,7 +21,6 @@
#include <sys/file.h> #include <sys/file.h>
#define LENGTH(x) (sizeof x / sizeof x[0]) #define LENGTH(x) (sizeof x / sizeof x[0])
#define CLEANMASK(mask) (mask & ~(GDK_MOD2_MASK))
enum { AtomFind, AtomGo, AtomUri, AtomLast }; enum { AtomFind, AtomGo, AtomUri, AtomLast };
@ -345,7 +344,7 @@ keypress(GtkWidget* w, GdkEventKey *ev, Client *c) {
updatewinid(c); updatewinid(c);
for(i = 0; i < LENGTH(keys); i++) { for(i = 0; i < LENGTH(keys); i++) {
if(gdk_keyval_to_lower(ev->keyval) == keys[i].keyval 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) {
keys[i].func(c, &(keys[i].arg)); keys[i].func(c, &(keys[i].arg));
processed = TRUE; processed = TRUE;