[wiki] [sites] [st][scrollback] Update, clean old patches || Ivan Tham

From: <git_AT_suckless.org>
Date: Tue, 14 Feb 2017 15:09:19 +0100

commit 83e7741e42bf4b3d243956e6f91eaf92ec40cfdd
Author: Ivan Tham <pickfire_AT_riseup.net>
Date: Tue Feb 14 22:09:14 2017 +0800

    [st][scrollback] Update, clean old patches

diff --git a/st.suckless.org/patches/scrollback.md b/st.suckless.org/patches/scrollback.md
index 78914f6..b2edc84 100644
--- a/st.suckless.org/patches/scrollback.md
+++ b/st.suckless.org/patches/scrollback.md
_AT_@ -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
deleted file mode 100644
index bcaf77c..0000000
--- a/st.suckless.org/patches/st-scrollback-mouse-20160727-308bfbf.diff
+++ /dev/null
_AT_@ -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
-_AT_@ -151,8 +151,14 @@ static unsigned int defaultunderline = 7;
- */
- static MouseShortcut mshortcuts[] = {
- /* button mask string */
-- { Button4, XK_ANY_MOD, "" },
-- { Button5, XK_ANY_MOD, "" },
-+ { Button4, XK_NO_MOD, "" },
-+ { Button5, XK_NO_MOD, "" },
-+};
-+
-+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
-_AT_@ -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 *);
-_AT_@ -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);
-_AT_@ -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
deleted file mode 100644
index 3dcb317..0000000
--- a/st.suckless.org/patches/st-scrollback-mouse-altscreen-20160727-308bfbf.diff
+++ /dev/null
_AT_@ -1,25 +0,0 @@
-diff --git a/st.c b/st.c
-index 2594c65..bf5dc3e 100644
---- a/st.c
-+++ b/st.c
-_AT_@ -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
deleted file mode 100644
index 78f766d..0000000
--- a/st.suckless.org/patches/st-scrollback-mouse-altscreen-20161020-6e79e83.diff
+++ /dev/null
_AT_@ -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
-_AT_@ -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
-_AT_@ -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
new file mode 100644
index 0000000..7af3a8a
--- /dev/null
+++ b/st.suckless.org/patches/st-scrollback-mouse-altscreen-20170213-c63a87c.diff
_AT_@ -0,0 +1,25 @@
+diff --git a/st.c b/st.c
+index f13b540..523f4ce 100644
+--- a/st.c
++++ b/st.c
+_AT_@ -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
Received on Tue Feb 14 2017 - 15:09:19 CET

This archive was generated by hypermail 2.3.0 : Tue Feb 14 2017 - 15:12:24 CET