aboutsummaryrefslogtreecommitdiff
path: root/st.c
diff options
context:
space:
mode:
authorAurélien Aptel <aurelien.aptel@gmail.com>2012-02-15 19:33:48 +0100
committerAurélien Aptel <aurelien.aptel@gmail.com>2012-02-15 19:33:48 +0100
commitadf5d2e32a74704778e60e71be5425b7d7fff3e2 (patch)
treed4da30d5797e6b9ebece1d3b0348631ac906acfd /st.c
parent62d380947ee9fb8a1d5678985b1a729cfd4310b4 (diff)
downloadst-adf5d2e32a74704778e60e71be5425b7d7fff3e2.tar.gz
st-adf5d2e32a74704778e60e71be5425b7d7fff3e2.tar.bz2
show dark cursor when unfocused.
Diffstat (limited to 'st.c')
-rw-r--r--st.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/st.c b/st.c
index 627e566..a86e0f9 100644
--- a/st.c
+++ b/st.c
@@ -1826,10 +1826,14 @@ xdrawcursor(void) {
xcopy(oldx, oldy, 1, 1);
/* draw the new one */
- if(!(term.c.state & CURSOR_HIDE) && (xw.state & WIN_FOCUSED)) {
- sl = utf8size(g.c);
+ if(!(term.c.state & CURSOR_HIDE)) {
+ if(!(xw.state & WIN_FOCUSED))
+ g.bg = DefaultUCS;
+
if(IS_SET(MODE_REVERSE))
g.mode |= ATTR_REVERSE, g.fg = DefaultCS, g.bg = DefaultFG;
+
+ sl = utf8size(g.c);
xdraws(g.c, g, term.c.x, term.c.y, 1, sl);
oldx = term.c.x, oldy = term.c.y;
}