[wiki] [sites] [st][scrollback] Update scrollback-mouse-altscreen || Ivan Tham
commit 452c6947b133d152060eecd4cfe6df1785ac9442
Author: Ivan Tham <pickfire_AT_riseup.net>
Date: Fri Mar 16 21:29:18 2018 +0800
[st][scrollback] Update scrollback-mouse-altscreen
diff --git a/st.suckless.org/patches/scrollback/index.md b/st.suckless.org/patches/scrollback/index.md
index a72fce35..8797a872 100644
--- a/st.suckless.org/patches/scrollback/index.md
+++ b/st.suckless.org/patches/scrollback/index.md
_AT_@ -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
new file mode 100644
index 00000000..f959be27
--- /dev/null
+++ b/st.suckless.org/patches/scrollback/st-scrollback-mouse-altscreen-0.8.diff
_AT_@ -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
+_AT_@ -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
+_AT_@ -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
Received on Fri Mar 16 2018 - 14:29:45 CET
This archive was generated by hypermail 2.3.0
: Fri Mar 16 2018 - 14:36:25 CET