diff options
author | Devin J. Pohly <djpohly@gmail.com> | 2017-10-10 12:01:18 -0500 |
---|---|---|
committer | Devin J. Pohly <djpohly@gmail.com> | 2018-02-25 21:53:24 -0600 |
commit | 626b0ae40c71b6c1e02ece79bf033432647381a6 (patch) | |
tree | 0c1e10fe2b7561a1df079f2184c052e5ccb993c3 /x.c | |
parent | d5275012b45149a2a6e94679609aacca478221ad (diff) | |
download | st-626b0ae40c71b6c1e02ece79bf033432647381a6.tar.gz st-626b0ae40c71b6c1e02ece79bf033432647381a6.tar.bz2 st-626b0ae40c71b6c1e02ece79bf033432647381a6.zip |
Move window urgency handling entirely into x.c
This allows us to make xseturgency internal.
Signed-off-by: Devin J. Pohly <djpohly@gmail.com>
Diffstat (limited to 'x.c')
-rw-r--r-- | x.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -94,6 +94,7 @@ static void xloadfonts(char *, double); static void xunloadfont(Font *); static void xunloadfonts(void); static void xsetenv(void); +static void xseturgency(int); static void expose(XEvent *); static void visibility(XEvent *); @@ -1521,9 +1522,12 @@ xseturgency(int add) } void -xbell(int vol) +xbell(void) { - XkbBell(xw.dpy, xw.win, vol, (Atom)NULL); + if (!(win.state & WIN_FOCUSED)) + xseturgency(1); + if (bellvolume) + XkbBell(xw.dpy, xw.win, bellvolume, (Atom)NULL); } void |