X-Git-Url: https://git.xinqibao.xyz/st.git/blobdiff_plain/ebbac77d7416d365a2a33f159780ef0f06cc3351..6e1c7c8afce3a0e6f896231a3155a27543d261e5:/st.c diff --git a/st.c b/st.c index 96111a0..66aca2d 100644 --- a/st.c +++ b/st.c @@ -916,7 +916,6 @@ bpress(XEvent *e) { if(sel.snap != 0) { sel.mode++; tsetdirt(sel.nb.y, sel.ne.y); - draw(); } sel.tclick2 = sel.tclick1; sel.tclick1 = now; @@ -3356,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