tcursor is hid when unfocused. - st - [fork] customized build of st, the simple… | |
git clone git://src.adamsgaard.dk/st | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
commit 326586ba434fb873ebdb81f385ebe838419a98a7 | |
parent ae5baac932af877cb18df6853d45f033ed9b270f | |
Author: Aurélien Aptel <[email protected]> | |
Date: Mon, 30 Aug 2010 15:28:29 +0200 | |
cursor is hid when unfocused. | |
Diffstat: | |
M config.h | 2 +- | |
M st.c | 3 ++- | |
2 files changed, 3 insertions(+), 2 deletions(-) | |
--- | |
diff --git a/config.h b/config.h | |
t@@ -1,7 +1,7 @@ | |
#define TAB 8 | |
#define TNAME "st-256color" | |
#define FONT "6x13" | |
-#define BOLDFONT FONT"bold" | |
+#define BOLDFONT "6x13bold" | |
#define BORDER 2 | |
/* Terminal colors */ | |
diff --git a/st.c b/st.c | |
t@@ -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; | |
} | |
t@@ -1216,6 +1216,7 @@ void | |
focus(XEvent *ev) { | |
if((xw.hasfocus = ev->type == FocusIn)) | |
xseturgency(0); | |
+ draw(SCREEN_UPDATE); | |
} | |
char* |