Xinqi Bao's Git
projects
/
st.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
raw
|
inline
| side by side
Fix match function bugs
[st.git]
/
st.c
diff --git
a/st.c
b/st.c
index
2809592
..
66aca2d
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) {
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(mask == XK_NO_MOD && state)
return false;
if(mask != XK_ANY_MOD && mask != XK_NO_MOD && !state)
return false;
- if(
(state & mask) != state
)
- return
fals
e;
- return
true
;
+ if(
mask == XK_ANY_MOD
)
+ return
tru
e;
+ return
state == mask
;
}
void
}
void