aboutsummaryrefslogtreecommitdiffstats
path: root/st.c
diff options
context:
space:
mode:
authorAurélien Aptel <aurelien.aptel@gmail.com>2010-08-30 15:28:29 +0200
committerAurélien Aptel <aurelien.aptel@gmail.com>2010-08-30 15:28:29 +0200
commit326586ba434fb873ebdb81f385ebe838419a98a7 (patch)
treec20e97feed9a96266a12f5cbb16888734e49e506 /st.c
parentae5baac932af877cb18df6853d45f033ed9b270f (diff)
downloadst-326586ba434fb873ebdb81f385ebe838419a98a7.tar.gz
cursor is hid when unfocused.
Diffstat (limited to 'st.c')
-rw-r--r--st.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/st.c b/st.c
index f42797f..73121ef 100644
--- a/st.c
+++ b/st.c
@@ -1129,7 +1129,7 @@ xdrawcursor(void) {
xclear(oldx, oldy, oldx, oldy);
/* draw the new one */
- if(!(term.c.state & CURSOR_HIDE)) {
+ if(!(term.c.state & CURSOR_HIDE) && xw.hasfocus) {
xdraws(&g.c, g, term.c.x, term.c.y, 1);
oldx = term.c.x, oldy = term.c.y;
}
@@ -1216,6 +1216,7 @@ void
focus(XEvent *ev) {
if((xw.hasfocus = ev->type == FocusIn))
xseturgency(0);
+ draw(SCREEN_UPDATE);
}
char*
remember that computers suck.