mirror of
https://github.com/alrayyes/st.git
synced 2024-11-26 04:46:22 +00:00
cursor is hid when unfocused.
This commit is contained in:
parent
ae5baac932
commit
326586ba43
2 changed files with 3 additions and 2 deletions
2
config.h
2
config.h
|
@ -1,7 +1,7 @@
|
||||||
#define TAB 8
|
#define TAB 8
|
||||||
#define TNAME "st-256color"
|
#define TNAME "st-256color"
|
||||||
#define FONT "6x13"
|
#define FONT "6x13"
|
||||||
#define BOLDFONT FONT"bold"
|
#define BOLDFONT "6x13bold"
|
||||||
#define BORDER 2
|
#define BORDER 2
|
||||||
|
|
||||||
/* Terminal colors */
|
/* Terminal colors */
|
||||||
|
|
3
st.c
3
st.c
|
@ -1129,7 +1129,7 @@ xdrawcursor(void) {
|
||||||
xclear(oldx, oldy, oldx, oldy);
|
xclear(oldx, oldy, oldx, oldy);
|
||||||
|
|
||||||
/* draw the new one */
|
/* 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);
|
xdraws(&g.c, g, term.c.x, term.c.y, 1);
|
||||||
oldx = term.c.x, oldy = term.c.y;
|
oldx = term.c.x, oldy = term.c.y;
|
||||||
}
|
}
|
||||||
|
@ -1216,6 +1216,7 @@ void
|
||||||
focus(XEvent *ev) {
|
focus(XEvent *ev) {
|
||||||
if((xw.hasfocus = ev->type == FocusIn))
|
if((xw.hasfocus = ev->type == FocusIn))
|
||||||
xseturgency(0);
|
xseturgency(0);
|
||||||
|
draw(SCREEN_UPDATE);
|
||||||
}
|
}
|
||||||
|
|
||||||
char*
|
char*
|
||||||
|
|
Loading…
Reference in a new issue