sites

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit 452c6947b133d152060eecd4cfe6df1785ac9442
parent 4428abd1e70b6ce4cc5a7be991b8c69f25930142
Author: Ivan Tham <pickfire@riseup.net>
Date:   Fri, 16 Mar 2018 21:29:18 +0800

[st][scrollback] Update scrollback-mouse-altscreen

Diffstat:
Mst.suckless.org/patches/scrollback/index.md | 1+
Ast.suckless.org/patches/scrollback/st-scrollback-mouse-altscreen-0.8.diff | 40++++++++++++++++++++++++++++++++++++++++
2 files changed, 41 insertions(+), 0 deletions(-)

diff --git a/st.suckless.org/patches/scrollback/index.md b/st.suckless.org/patches/scrollback/index.md @@ -26,6 +26,7 @@ modifier for scrolling is not needed anymore. **Note: It might break other mkeys excluding scrolling functions.** * [st-scrollback-mouse-altscreen-20170427-5a10aca.diff](st-scrollback-mouse-altscreen-20170427-5a10aca.diff) +* [st-scrollback-mouse-altscreen-0.8.diff](st-scrollback-mouse-altscreen-0.8.diff) Notes ----- diff --git a/st.suckless.org/patches/scrollback/st-scrollback-mouse-altscreen-0.8.diff b/st.suckless.org/patches/scrollback/st-scrollback-mouse-altscreen-0.8.diff @@ -0,0 +1,40 @@ +diff --git a/config.def.h b/config.def.h +index feec7e2..f1a9768 100644 +--- a/config.def.h ++++ b/config.def.h +@@ -162,8 +162,8 @@ static MouseShortcut mshortcuts[] = { + + MouseKey mkeys[] = { + /* button mask function argument */ +- { Button4, ShiftMask, kscrollup, {.i = 1} }, +- { Button5, ShiftMask, kscrolldown, {.i = 1} }, ++ { Button4, XK_NO_MOD, kscrollup, {.i = 1} }, ++ { Button5, XK_NO_MOD, kscrolldown, {.i = 1} }, + }; + + /* Internal keyboard shortcuts. */ +diff --git a/x.c b/x.c +index 754d859..1f49295 100644 +--- a/x.c ++++ b/x.c +@@ -417,13 +417,14 @@ bpress(XEvent *e) + return; + } + +- for (ms = mshortcuts; ms < mshortcuts + LEN(mshortcuts); ms++) { +- if (e->xbutton.button == ms->b +- && match(ms->mask, e->xbutton.state)) { +- ttywrite(ms->s, strlen(ms->s), 1); +- return; ++ if (IS_SET(MODE_ALTSCREEN)) ++ for (ms = mshortcuts; ms < mshortcuts + LEN(mshortcuts); ms++) { ++ if (e->xbutton.button == ms->b ++ && match(ms->mask, e->xbutton.state)) { ++ ttywrite(ms->s, strlen(ms->s), 1); ++ return; ++ } + } +- } + + for (mk = mkeys; mk < mkeys + LEN(mkeys); mk++) { + if (e->xbutton.button == mk->b