[wiki] [sites] [st][patch][visualbell] Update patch to newest st version 0.8.3 || Matthias Schoth
commit fc8c7c4424ffec13838469eff719621af0ac9bb4
Author: Matthias Schoth <mschoth_AT_gmail.com>
Date: Fri May 15 14:15:03 2020 +0200
[st][patch][visualbell] Update patch to newest st version 0.8.3
diff --git a/st.suckless.org/patches/visualbell/index.md b/st.suckless.org/patches/visualbell/index.md
index 1d249b62..2ce06caa 100644
--- a/st.suckless.org/patches/visualbell/index.md
+++ b/st.suckless.org/patches/visualbell/index.md
_AT_@ -1,6 +1,5 @@
-*Note*: [visual bell 2](../visualbell2) was moved to its own page.
-
-# Visual bell
+visualbell
+==========
Description
-----------
_AT_@ -16,9 +15,13 @@ 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)
+* [st-visualbell-0.8.3.diff](st-visualbell-0.8.3.diff)
Authors
-------
* Matthias Schoth - <mschoth_AT_gmail.com>
* Laslo Hunhold - <dev_AT_frign.de> (git port)
* Alexis Ben Miloud--Josselin; panpo; alexisbmj+code at protonmail dot com.
+
+*Note*: [visual bell 2](../visualbell2) was moved to its own page.
+
diff --git a/st.suckless.org/patches/visualbell/st-visualbell-0.8.3.diff b/st.suckless.org/patches/visualbell/st-visualbell-0.8.3.diff
new file mode 100644
index 00000000..bfa1837e
--- /dev/null
+++ b/st.suckless.org/patches/visualbell/st-visualbell-0.8.3.diff
_AT_@ -0,0 +1,53 @@
+From be009f16642dc460182fce800ba5868e70cc3956 Mon Sep 17 00:00:00 2001
+From: Matthias Schoth <mschoth_AT_gmail.com>
+Date: Tue, 12 May 2020 18:27:29 +0200
+Subject: [PATCH] visualbell
+
+---
+ x.c | 16 +++++++++++++++-
+ 1 file changed, 15 insertions(+), 1 deletion(-)
+
+diff --git a/x.c b/x.c
+index e5f1737..4986374 100644
+--- a/x.c
++++ b/x.c
+_AT_@ -253,6 +253,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_@ -1713,6 +1714,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_@ -1943,7 +1953,11 @@ run(void)
+ (handler[ev.type])(&ev);
+ }
+
+- draw();
++ if (bellon) {
++ bellon = 0;
++ redraw();
++ }
++ else draw();
+ XFlush(xw.dpy);
+
+ if (xev && !FD_ISSET(xfd, &rfd))
+--
+2.26.2
+
Received on Fri May 15 2020 - 14:21:45 CEST
This archive was generated by hypermail 2.3.0
: Fri May 15 2020 - 14:24:50 CEST