Commit Diff


commit - 62d380947ee9fb8a1d5678985b1a729cfd4310b4
commit + adf5d2e32a74704778e60e71be5425b7d7fff3e2
blob - 62a9f427358c4d201cc740a93609e8d9b1eddda7
blob + 311d9ca36c4150b7726d8c4f4d6295a97e542888
--- TODO
+++ TODO
@@ -10,10 +10,15 @@ code & interface
 
 * clean selection code
 * clean and complete terminfo entry
-* fix shift up/down (shift selection in emacs)
 * fast drawing
 * ...
 
+bugs
+----
+
+* handle XOpenMI() errors
+* fix shift up/down (shift selection in emacs)
+
 misc
 ----
 
blob - f1bd91ea8956d3a81cc9f1026ec7b43b93a15674
blob + 169bcdd3e13cd390a95e25360e109cc1a0f80c62
--- config.def.h
+++ config.def.h
@@ -32,13 +32,15 @@ static const char *colorname[] = {
 	
 	/* more colors can be added to use with DefaultXX */
 	"#cccccc",
+	"#333333",
 };
 
 /* Default colors (colorname index)
-   foreground, background, cursor   */
-#define DefaultFG 7
-#define DefaultBG 0
-#define DefaultCS 16
+   foreground, background, cursor, unfocused cursor */
+#define DefaultFG  7
+#define DefaultBG  0
+#define DefaultCS  16
+#define DefaultUCS 17
 
 /* Special keys (change & recompile st.info accordingly)
    Keep in mind that kpress() in st.c hardcodes some keys.
blob - 627e5666012db9769a693d592ab61e20e890e1e7
blob + a86e0f95d37854ab9c75d7613cd4eab30b33adc3
--- st.c
+++ 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;
 	}