X-Git-Url: https://git.xinqibao.xyz/st.git/blobdiff_plain/40907c51899afc2e3b2a4a4a397e7501feaf3bbe..38e06f2ccbe225c6a0b0fa902a01dcbb7919653a:/x.c diff --git a/x.c b/x.c index b5acc4c..12b7e7d 100644 --- a/x.c +++ b/x.c @@ -35,6 +35,7 @@ typedef struct { void (*func)(const Arg *); const Arg arg; uint release; + int altscrn; /* 0: don't care, -1: not alt screen, 1: alt screen */ } MouseShortcut; typedef struct { @@ -472,6 +473,7 @@ mouseaction(XEvent *e, uint release) for (ms = mshortcuts; ms < mshortcuts + LEN(mshortcuts); ms++) { if (ms->release == release && ms->button == e->xbutton.button && + (!ms->altscrn || (ms->altscrn == (tisaltscr() ? 1 : -1))) && (match(ms->mod, state) || /* exact or forced */ match(ms->mod, state & ~forcemousemod))) { ms->func(&(ms->arg));