diff options
author | Mark Edgar <medgar123@gmail.com> | 2013-10-19 14:56:40 +0200 |
---|---|---|
committer | Roberto E. Vargas Caballero <k0ga@shike2.com> | 2013-10-28 19:28:35 +0100 |
commit | 1fa27b93f9a78ee78a35a5449bb8c4d0c3ef0f1b (patch) | |
tree | 92d6d894a397ea92bac7a85fbb775c403d310c4a | |
parent | 3d3c37bc70042cd2f4bbc8f6ea5fceb2311f0a32 (diff) | |
download | st-1fa27b93f9a78ee78a35a5449bb8c4d0c3ef0f1b.tar.gz |
Simplify logic in match().
-rw-r--r-- | st.c | 10 |
1 files changed, 1 insertions, 9 deletions
@@ -3501,15 +3501,7 @@ focus(XEvent *ev) { static inline bool match(uint mask, uint state) { - state &= ~ignoremod; - - if(mask == XK_NO_MOD && state) - return false; - if(mask != XK_ANY_MOD && mask != XK_NO_MOD && !state) - return false; - if(mask == XK_ANY_MOD) - return true; - return state == mask; + return mask == XK_ANY_MOD || mask == (state & ~ignoremod); } void |