Re-added visualbell patch
This commit is contained in:
parent
c8d69b5d70
commit
315c5cbe9f
|
@ -15,6 +15,8 @@ Refer to [https://st.suckless.org/](https://st.suckless.org/) for details on the
|
|||
|
||||
### Changelog:
|
||||
|
||||
2020-08-08 - Re-added the visualbell patch
|
||||
|
||||
2020-06-26 - Added the single drawable buffer patch as per the FAQ in order to get w3m images to display
|
||||
|
||||
2020-06-25 - Upgrade to 0.8.4 (367803, 2020-06-19)
|
||||
|
@ -135,8 +137,8 @@ Refer to [https://st.suckless.org/](https://st.suckless.org/) for details on the
|
|||
- [vertcenter](https://st.suckless.org/patches/vertcenter/)
|
||||
- vertically center lines in the space available if you have set a larger chscale in config.h
|
||||
|
||||
- [~visualbell~](https://st.suckless.org/patches/visualbell/)
|
||||
- ~adds visual indicators for the terminal bell event~
|
||||
- [visualbell](https://st.suckless.org/patches/visualbell/)
|
||||
- adds visual indicators for the terminal bell event
|
||||
|
||||
- [w3m](https://st.suckless.org/patches/w3m/)
|
||||
- adds support for w3m images
|
||||
|
|
|
@ -210,6 +210,11 @@
|
|||
*/
|
||||
#define VERTCENTER_PATCH 0
|
||||
|
||||
/* Briefly inverts window content on terminal bell event.
|
||||
* https://st.suckless.org/patches/visualbell/
|
||||
*/
|
||||
#define VISUALBELL_1_PATCH 0
|
||||
|
||||
/* Adds support for w3m images.
|
||||
* https://st.suckless.org/patches/w3m/
|
||||
*/
|
||||
|
|
18
x.c
18
x.c
|
@ -289,6 +289,9 @@ static char *opt_dir = NULL;
|
|||
#endif // WORKINGDIR_PATCH
|
||||
|
||||
static int oldbutton = 3; /* button event on startup: 3 = release */
|
||||
#if VISUALBELL_1_PATCH
|
||||
static int bellon = 0; /* visual bell status */
|
||||
#endif // VISUALBELL_1_PATCH
|
||||
|
||||
#include "patch/x_include.c"
|
||||
|
||||
|
@ -2103,6 +2106,10 @@ xbell(void)
|
|||
xseturgency(1);
|
||||
if (bellvolume)
|
||||
XkbBell(xw.dpy, xw.win, bellvolume, (Atom)NULL);
|
||||
#if VISUALBELL_1_PATCH
|
||||
if (!bellon) /* turn visual bell on */
|
||||
bellon = 1;
|
||||
#endif // VISUALBELL_1_PATCH
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -2387,7 +2394,18 @@ run(void)
|
|||
}
|
||||
}
|
||||
|
||||
#if VISUALBELL_1_PATCH
|
||||
if (bellon) {
|
||||
bellon++;
|
||||
bellon %= 3;
|
||||
MODBIT(win.mode, !IS_SET(MODE_REVERSE), MODE_REVERSE);
|
||||
redraw();
|
||||
}
|
||||
else
|
||||
draw();
|
||||
#else
|
||||
draw();
|
||||
#endif // VISUALBELL_1_PATCH
|
||||
XFlush(xw.dpy);
|
||||
drawing = 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue