mirror of
https://github.com/LukeSmithxyz/st.git
synced 2024-11-22 07:15:59 +01:00
Simplify logic in match().
This commit is contained in:
parent
3d3c37bc70
commit
1fa27b93f9
1 changed files with 1 additions and 9 deletions
10
st.c
10
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
|
||||
|
|
Loading…
Reference in a new issue