X-Git-Url: https://git.danieliu.xyz/?a=blobdiff_plain;ds=sidebyside;f=st.c;h=65a1866684fea3dfe4b065e9e118ed68460f7806;hb=f0398db4d172e838ef4b4ae55db3fb6a6fee6717;hp=b2a4fff18d17c3a952adad0358cb5ee17e040ca5;hpb=f56c58a968c1b3ddae76864bc9e27e5b9cc055c4;p=st.git diff --git a/st.c b/st.c index b2a4fff..65a1866 100644 --- a/st.c +++ b/st.c @@ -275,7 +275,7 @@ typedef struct { uint b; uint mask; char *s; -} Mousekey; +} MouseShortcut; typedef struct { KeySym k; @@ -944,17 +944,17 @@ void bpress(XEvent *e) { struct timespec now; - Mousekey *mk; + MouseShortcut *ms; if (IS_SET(MODE_MOUSE) && !(e->xbutton.state & forceselmod)) { mousereport(e); return; } - for (mk = mshortcuts; mk < mshortcuts + LEN(mshortcuts); mk++) { - if (e->xbutton.button == mk->b - && match(mk->mask, e->xbutton.state)) { - ttysend(mk->s, strlen(mk->s)); + for (ms = mshortcuts; ms < mshortcuts + LEN(mshortcuts); ms++) { + if (e->xbutton.button == ms->b + && match(ms->mask, e->xbutton.state)) { + ttysend(ms->s, strlen(ms->s)); return; } }