fixing numlock bug.
This commit is contained in:
parent
4dbf90e0d7
commit
38d809ce59
1 changed files with 3 additions and 1 deletions
4
surf.c
4
surf.c
|
@ -17,6 +17,7 @@
|
||||||
#include <glib/gstdio.h>
|
#include <glib/gstdio.h>
|
||||||
|
|
||||||
#define LENGTH(x) (sizeof x / sizeof x[0])
|
#define LENGTH(x) (sizeof x / sizeof x[0])
|
||||||
|
#define CLEANMASK(mask) (mask & ~(GDK_MOD2_MASK))
|
||||||
|
|
||||||
Display *dpy;
|
Display *dpy;
|
||||||
Atom urlprop;
|
Atom urlprop;
|
||||||
|
@ -276,7 +277,8 @@ keypress(GtkWidget* w, GdkEventKey *ev, Client *c) {
|
||||||
focus = BROWSER;
|
focus = BROWSER;
|
||||||
for(i = 0; i < LENGTH(keys); i++) {
|
for(i = 0; i < LENGTH(keys); i++) {
|
||||||
if(focus & keys[i].focus && ev->keyval == keys[i].keyval &&
|
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) {
|
||||||
keys[i].func(c, &(keys[i].arg));
|
keys[i].func(c, &(keys[i].arg));
|
||||||
processed = TRUE;
|
processed = TRUE;
|
||||||
|
|
Loading…
Reference in a new issue