show dark cursor when unfocused.
This commit is contained in:
parent
d8e11bdb0e
commit
be2877cd04
7
TODO
7
TODO
@ -10,10 +10,15 @@ code & interface
|
|||||||
|
|
||||||
* clean selection code
|
* clean selection code
|
||||||
* clean and complete terminfo entry
|
* clean and complete terminfo entry
|
||||||
* fix shift up/down (shift selection in emacs)
|
|
||||||
* fast drawing
|
* fast drawing
|
||||||
* ...
|
* ...
|
||||||
|
|
||||||
|
bugs
|
||||||
|
----
|
||||||
|
|
||||||
|
* handle XOpenMI() errors
|
||||||
|
* fix shift up/down (shift selection in emacs)
|
||||||
|
|
||||||
misc
|
misc
|
||||||
----
|
----
|
||||||
|
|
||||||
|
10
config.def.h
10
config.def.h
@ -32,13 +32,15 @@ static const char *colorname[] = {
|
|||||||
|
|
||||||
/* more colors can be added to use with DefaultXX */
|
/* more colors can be added to use with DefaultXX */
|
||||||
"#cccccc",
|
"#cccccc",
|
||||||
|
"#333333",
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Default colors (colorname index)
|
/* Default colors (colorname index)
|
||||||
foreground, background, cursor */
|
foreground, background, cursor, unfocused cursor */
|
||||||
#define DefaultFG 7
|
#define DefaultFG 7
|
||||||
#define DefaultBG 0
|
#define DefaultBG 0
|
||||||
#define DefaultCS 16
|
#define DefaultCS 16
|
||||||
|
#define DefaultUCS 17
|
||||||
|
|
||||||
/* Special keys (change & recompile st.info accordingly)
|
/* Special keys (change & recompile st.info accordingly)
|
||||||
Keep in mind that kpress() in st.c hardcodes some keys.
|
Keep in mind that kpress() in st.c hardcodes some keys.
|
||||||
|
8
st.c
8
st.c
@ -1826,10 +1826,14 @@ xdrawcursor(void) {
|
|||||||
xcopy(oldx, oldy, 1, 1);
|
xcopy(oldx, oldy, 1, 1);
|
||||||
|
|
||||||
/* draw the new one */
|
/* draw the new one */
|
||||||
if(!(term.c.state & CURSOR_HIDE) && (xw.state & WIN_FOCUSED)) {
|
if(!(term.c.state & CURSOR_HIDE)) {
|
||||||
sl = utf8size(g.c);
|
if(!(xw.state & WIN_FOCUSED))
|
||||||
|
g.bg = DefaultUCS;
|
||||||
|
|
||||||
if(IS_SET(MODE_REVERSE))
|
if(IS_SET(MODE_REVERSE))
|
||||||
g.mode |= ATTR_REVERSE, g.fg = DefaultCS, g.bg = DefaultFG;
|
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);
|
xdraws(g.c, g, term.c.x, term.c.y, 1, sl);
|
||||||
oldx = term.c.x, oldy = term.c.y;
|
oldx = term.c.x, oldy = term.c.y;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user