summaryrefslogtreecommitdiff
path: root/surf.c
diff options
context:
space:
mode:
authorChristoph Lohmann <20h@r-36.net>2013-01-26 16:00:52 +0100
committerChristoph Lohmann <20h@r-36.net>2013-01-26 16:00:52 +0100
commit0415175e10880585c765613af0bd43e02de87116 (patch)
treee1df8b32673a1b64f9938dd0ecd184800264433e /surf.c
parente784d925dfab0405cb4bf2ac7466045d8089a189 (diff)
downloadsurf-0415175e10880585c765613af0bd43e02de87116.tar.gz
surf-0415175e10880585c765613af0bd43e02de87116.tar.bz2
surf-0415175e10880585c765613af0bd43e02de87116.zip
Making more than one Modkey to work in keys.
Diffstat (limited to 'surf.c')
-rw-r--r--surf.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/surf.c b/surf.c
index 14788e5..682c1e2 100644
--- a/surf.c
+++ b/surf.c
@@ -28,6 +28,7 @@
char *argv0;
#define LENGTH(x) (sizeof x / sizeof x[0])
+#define CLEANMASK(mask) (mask & (MODKEY|GDK_SHIFT_MASK))
#define COOKIEJAR_TYPE (cookiejar_get_type ())
#define COOKIEJAR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), COOKIEJAR_TYPE, CookieJar))
@@ -543,7 +544,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
- && (ev->state & keys[i].mod) == keys[i].mod
+ && CLEANMASK(ev->state) == keys[i].mod
&& keys[i].func) {
keys[i].func(c, &(keys[i].arg));
processed = TRUE;