changeset: 73:bd17a41b6dcb
tag: tip
user: Enno Boland (tox) <tox_AT_s01.de>
date: Mon Sep 07 15:43:18 2009 +0200
files: surf.c
description:
fixing numlock bug.
diff -r f5b782fe4dba -r bd17a41b6dcb surf.c
--- a/surf.c Mon Sep 07 15:10:25 2009 +0200
+++ b/surf.c Mon Sep 07 15:43:18 2009 +0200
@@ -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 @@
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;
Received on Mon Sep 07 2009 - 13:41:46 UTC
This archive was generated by hypermail 2.2.0 : Mon Sep 07 2009 - 13:48:05 UTC