From 682f9c27ab916894aa788a14b3520546c1da7ba6 Mon Sep 17 00:00:00 2001 From: Federico Igne Date: Sat, 23 May 2020 10:45:45 +0100 Subject: Apply Scrollback patch Homepage link: https://st.suckless.org/patches/scrollback/ Patch link: https://st.suckless.org/patches/scrollback/st-scrollback-20200419-72e3f6c.diff https://st.suckless.org/patches/scrollback/st-scrollback-mouse-20191024-a2c479c.diff https://st.suckless.org/patches/scrollback/st-scrollback-mouse-altscreen-20200416-5703aa0.diff https://st.suckless.org/patches/scrollback/st-scrollback-mouse-increment-0.8.2.diff Additional info: + patch applied because I'm planning on ditching tmux, which currently provides this functionality; + patches applied manually. --- x.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'x.c') diff --git a/x.c b/x.c index 57f6f1b..18d258e 100644 --- a/x.c +++ b/x.c @@ -34,6 +34,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 { @@ -434,6 +435,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, e->xbutton.state) || /* exact or forced */ match(ms->mod, e->xbutton.state & ~forcemousemod))) { ms->func(&(ms->arg)); -- cgit v1.2.3