From 5f16c44199580b672d31eb0e9e1a49a59bd0b1b0 Mon Sep 17 00:00:00 2001 From: Mark Hills Date: Fri, 6 Apr 2012 01:04:17 +0100 Subject: [PATCH 1/2] Display cursor even when window is not focused Mimic the behaviour of xterm, and show a hollow cursor. --- st.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/st.c b/st.c index abaa7bf..0ee9a67 100644 --- a/st.c +++ b/st.c @@ -1833,6 +1833,10 @@ xdrawcursor(void) { g.mode |= ATTR_REVERSE, g.fg = DefaultCS, g.bg = DefaultFG; xdraws(g.c, g, term.c.x, term.c.y, 1, sl); oldx = term.c.x, oldy = term.c.y; + } else { + XSetForeground(xw.dpy, dc.gc, dc.col[DefaultCS]); + XDrawRectangle(xw.dpy, xw.buf, dc.gc, term.c.x * xw.cw, term.c.y * xw.ch, + xw.cw - 1, xw.ch - 1); } xcopy(term.c.x, term.c.y, 1, 1); -- 1.7.4.4