X-Git-Url: https://jasonwoof.com/gitweb/?p=st.git;a=blobdiff_plain;f=st.c;h=66aca2d9900f42552f18a09a31ad2d3cf7d3d64b;hp=28095927c6e9d5a7ec227c6c3496a92fb9c3686e;hb=6e1c7c8afce3a0e6f896231a3155a27543d261e5;hpb=90c6f055b637a58da0381a21b4a290ce26f56d8f diff --git a/st.c b/st.c index 2809592..66aca2d 100644 --- 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