[wiki] [sites] [st][visualbell] Update patch to newest version || Matthias Schoth

From: <git_AT_suckless.org>
Date: Sun, 15 Apr 2018 17:31:28 +0200

commit d247ba7ec43197ee97a544936618994b70b1d014
Author: Matthias Schoth <mschoth_AT_gmail.com>
Date: Sun Apr 15 17:30:15 2018 +0200

    [st][visualbell] Update patch to newest version

diff --git a/st.suckless.org/patches/visualbell/index.md b/st.suckless.org/patches/visualbell/index.md
index 41bf5ffb..a953e989 100644
--- a/st.suckless.org/patches/visualbell/index.md
+++ b/st.suckless.org/patches/visualbell/index.md
_AT_@ -18,6 +18,7 @@ Download
 
  * [st-visualbell-20160727-308bfbf.diff](st-visualbell-20160727-308bfbf.diff)
  * [st-visualbell-20180101-1f24bde.diff](st-visualbell-20180101-1f24bde.diff)
+ * [st-visualbell-0.8.1.diff](st-visualbell-0.8.1.diff)
 
 Authors
 -------
diff --git a/st.suckless.org/patches/visualbell/st-visualbell-0.8.1.diff b/st.suckless.org/patches/visualbell/st-visualbell-0.8.1.diff
new file mode 100644
index 00000000..9be7c3e0
--- /dev/null
+++ b/st.suckless.org/patches/visualbell/st-visualbell-0.8.1.diff
_AT_@ -0,0 +1,41 @@
+diff --git a/x.c b/x.c
+index c343ba2..26bb9bb 100644
+--- a/x.c
++++ b/x.c
+_AT_@ -239,6 +239,7 @@ static char *opt_name = NULL;
+ static char *opt_title = NULL;
+
+ static int oldbutton = 3; /* button event on startup: 3 = release */
++static int bellon = 0; /* visual bell status */
+
+ void
+ clipcopy(const Arg *dummy)
+_AT_@ -1614,6 +1615,15 @@ xbell(void)
+ xseturgency(1);
+ if (bellvolume)
+ XkbBell(xw.dpy, xw.win, bellvolume, (Atom)NULL);
++
++ /* visual bell*/
++ if (!bellon) {
++ bellon = 1;
++ MODBIT(win.mode, !IS_SET(MODE_REVERSE), MODE_REVERSE);
++ redraw();
++ XFlush(xw.dpy);
++ MODBIT(win.mode, !IS_SET(MODE_REVERSE), MODE_REVERSE);
++ }
+ }
+
+ void
+_AT_@ -1840,7 +1850,11 @@ run(void)
+ (handler[ev.type])(&ev);
+ }
+
+- draw();
++ if (bellon) {
++ bellon = 0;
++ redraw();
++ }
++ else draw();
+ XFlush(xw.dpy);
+
+ if (xev && !FD_ISSET(xfd, &rfd))
Received on Sun Apr 15 2018 - 17:31:28 CEST

This archive was generated by hypermail 2.3.0 : Sun Apr 15 2018 - 17:36:23 CEST