pinosaur
/
st.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3d3c37b
)
Simplify logic in match().
author
Mark Edgar
<medgar123@gmail.com>
Sat, 19 Oct 2013 12:56:40 +0000
(14:56 +0200)
committer
Roberto E. Vargas Caballero
<k0ga@shike2.com>
Mon, 28 Oct 2013 18:28:35 +0000
(19:28 +0100)
st.c
patch
|
blob
|
history
diff --git
a/st.c
b/st.c
index
8cfa2f7
..
da2ce3f
100644
(file)
--- a/
st.c
+++ b/
st.c
@@
-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