diff options
author | Federico Igne <git@federicoigne.com> | 2020-05-23 10:45:45 +0100 |
---|---|---|
committer | Federico Igne <git@federicoigne.com> | 2020-05-23 10:45:45 +0100 |
commit | 682f9c27ab916894aa788a14b3520546c1da7ba6 (patch) | |
tree | c815445e0bbec960fba5e9b158af16574b04006b /x.c | |
parent | 5bf570ff51b54228e8be399387f6a4928f3edbbd (diff) | |
download | st-682f9c27ab916894aa788a14b3520546c1da7ba6.tar.gz st-682f9c27ab916894aa788a14b3520546c1da7ba6.zip |
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.
Diffstat (limited to 'x.c')
-rw-r--r-- | x.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -34,6 +34,7 @@ typedef struct { | |||
34 | void (*func)(const Arg *); | 34 | void (*func)(const Arg *); |
35 | const Arg arg; | 35 | const Arg arg; |
36 | uint release; | 36 | uint release; |
37 | int altscrn; /* 0: don't care, -1: not alt screen, 1: alt screen */ | ||
37 | } MouseShortcut; | 38 | } MouseShortcut; |
38 | 39 | ||
39 | typedef struct { | 40 | typedef struct { |
@@ -434,6 +435,7 @@ mouseaction(XEvent *e, uint release) | |||
434 | for (ms = mshortcuts; ms < mshortcuts + LEN(mshortcuts); ms++) { | 435 | for (ms = mshortcuts; ms < mshortcuts + LEN(mshortcuts); ms++) { |
435 | if (ms->release == release && | 436 | if (ms->release == release && |
436 | ms->button == e->xbutton.button && | 437 | ms->button == e->xbutton.button && |
438 | (!ms->altscrn || (ms->altscrn == (tisaltscr() ? 1 : -1))) && | ||
437 | (match(ms->mod, e->xbutton.state) || /* exact or forced */ | 439 | (match(ms->mod, e->xbutton.state) || /* exact or forced */ |
438 | match(ms->mod, e->xbutton.state & ~forcemousemod))) { | 440 | match(ms->mod, e->xbutton.state & ~forcemousemod))) { |
439 | ms->func(&(ms->arg)); | 441 | ms->func(&(ms->arg)); |