]> git.armaanb.net Git - st.git/blobdiff - st.c
Fix match function bugs
[st.git] / st.c
diff --git a/st.c b/st.c
index 28095927c6e9d5a7ec227c6c3496a92fb9c3686e..66aca2d9900f42552f18a09a31ad2d3cf7d3d64b 100644 (file)
--- a/st.c
+++ b/st.c
@@ -3355,17 +3355,17 @@ focus(XEvent *ev) {
        }
 }
 
-inline bool
+static inline bool
 match(uint mask, uint state) {
-       state &= ~(ignoremod);
+       state &= ~ignoremod;
 
        if(mask == XK_NO_MOD && state)
                return false;
        if(mask != XK_ANY_MOD && mask != XK_NO_MOD && !state)
                return false;
-       if((state & mask) != state)
-               return false;
-       return true;
+       if(mask == XK_ANY_MOD)
+               return true;
+       return state == mask;
 }
 
 void