sites

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

commit 83e7741e42bf4b3d243956e6f91eaf92ec40cfdd
parent 75881bd685af01b110b9689109337110972e40e5
Author: Ivan Tham <pickfire@riseup.net>
Date:   Tue, 14 Feb 2017 22:09:14 +0800

[st][scrollback] Update, clean old patches

Diffstat:
Mst.suckless.org/patches/scrollback.md | 2+-
Dst.suckless.org/patches/st-scrollback-mouse-20160727-308bfbf.diff | 62--------------------------------------------------------------
Dst.suckless.org/patches/st-scrollback-mouse-altscreen-20160727-308bfbf.diff | 25-------------------------
Dst.suckless.org/patches/st-scrollback-mouse-altscreen-20161020-6e79e83.diff | 40----------------------------------------
Ast.suckless.org/patches/st-scrollback-mouse-altscreen-20170213-c63a87c.diff | 25+++++++++++++++++++++++++
5 files changed, 26 insertions(+), 128 deletions(-)

diff --git a/st.suckless.org/patches/scrollback.md b/st.suckless.org/patches/scrollback.md @@ -23,7 +23,7 @@ scrolled instead of the scrollback buffer in `less`. Consequently the Shift modifier for scrolling is not needed anymore. **Note: It might break other mkeys excluding scrolling functions.** -* [st-scrollback-mouse-altscreen-20161020-6e79e83.diff](st-scrollback-mouse-altscreen-20161020-6e79e83.diff) +* [st-scrollback-mouse-altscreen-20170213-c63a87c.diff](st-scrollback-mouse-altscreen-20170213-c63a87c.diff) Authors ------- diff --git a/st.suckless.org/patches/st-scrollback-mouse-20160727-308bfbf.diff b/st.suckless.org/patches/st-scrollback-mouse-20160727-308bfbf.diff @@ -1,62 +0,0 @@ -diff --git a/config.def.h b/config.def.h -index b41747f..5ab8d2e 100644 ---- a/config.def.h -+++ b/config.def.h -@@ -151,8 +151,14 @@ static unsigned int defaultunderline = 7; - */ - static MouseShortcut mshortcuts[] = { - /* button mask string */ -- { Button4, XK_ANY_MOD, "\031" }, -- { Button5, XK_ANY_MOD, "\005" }, -+ { Button4, XK_NO_MOD, "\031" }, -+ { Button5, XK_NO_MOD, "\005" }, -+}; -+ -+static MouseKey mkeys[] = { -+ /* button mask function argument */ -+ { Button4, ShiftMask, kscrollup, {.i = 1} }, -+ { Button5, ShiftMask, kscrolldown, {.i = 1} }, - }; - - /* Internal keyboard shortcuts. */ -diff --git a/st.c b/st.c -index 2594c65..9744bcf 100644 ---- a/st.c -+++ b/st.c -@@ -318,6 +318,13 @@ typedef union { - } Arg; - - typedef struct { -+ uint b; -+ uint mask; -+ void (*func)(const Arg *); -+ const Arg arg; -+} MouseKey; -+ -+typedef struct { - uint mod; - KeySym keysym; - void (*func)(const Arg *); -@@ -946,6 +953,7 @@ bpress(XEvent *e) - { - struct timespec now; - MouseShortcut *ms; -+ MouseKey *mk; - - if (IS_SET(MODE_MOUSE) && !(e->xbutton.state & forceselmod)) { - mousereport(e); -@@ -960,6 +968,14 @@ bpress(XEvent *e) - } - } - -+ for (mk = mkeys; mk < mkeys + LEN(mkeys); mk++) { -+ if (e->xbutton.button == mk->b -+ && match(mk->mask, e->xbutton.state)) { -+ mk->func(&mk->arg); -+ return; -+ } -+ } -+ - if (e->xbutton.button == Button1) { - clock_gettime(CLOCK_MONOTONIC, &now); - diff --git a/st.suckless.org/patches/st-scrollback-mouse-altscreen-20160727-308bfbf.diff b/st.suckless.org/patches/st-scrollback-mouse-altscreen-20160727-308bfbf.diff @@ -1,25 +0,0 @@ -diff --git a/st.c b/st.c -index 2594c65..bf5dc3e 100644 ---- a/st.c -+++ b/st.c -@@ -952,13 +952,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)) { -- ttysend(ms->s, strlen(ms->s)); -- 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)) { -+ ttysend(ms->s, strlen(ms->s)); -+ return; -+ } - } -- } - - if (e->xbutton.button == Button1) { - clock_gettime(CLOCK_MONOTONIC, &now); diff --git a/st.suckless.org/patches/st-scrollback-mouse-altscreen-20161020-6e79e83.diff b/st.suckless.org/patches/st-scrollback-mouse-altscreen-20161020-6e79e83.diff @@ -1,40 +0,0 @@ -diff --git a/config.def.h b/config.def.h -index 34ebb44..25e9c4d 100644 ---- a/config.def.h -+++ b/config.def.h -@@ -158,8 +158,8 @@ static MouseShortcut mshortcuts[] = { - - static 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/st.c b/st.c -index c71b6e7..5e8ab12 100644 ---- a/st.c -+++ b/st.c -@@ -967,13 +967,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)) { -- ttysend(ms->s, strlen(ms->s)); -- 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)) { -+ ttysend(ms->s, strlen(ms->s)); -+ return; -+ } - } -- } - - for (mk = mkeys; mk < mkeys + LEN(mkeys); mk++) { - if (e->xbutton.button == mk->b diff --git a/st.suckless.org/patches/st-scrollback-mouse-altscreen-20170213-c63a87c.diff b/st.suckless.org/patches/st-scrollback-mouse-altscreen-20170213-c63a87c.diff @@ -0,0 +1,25 @@ +diff --git a/st.c b/st.c +index f13b540..523f4ce 100644 +--- a/st.c ++++ b/st.c +@@ -979,13 +979,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)) { +- ttysend(ms->s, strlen(ms->s)); +- 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)) { ++ ttysend(ms->s, strlen(ms->s)); ++ return; ++ } + } +- } + + for (mk = mkeys; mk < mkeys + LEN(mkeys); mk++) { + if (e->xbutton.button == mk->b