X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;ds=sidebyside;f=st.c;h=73121efec841e06d5520b3c25f678a5c2325e54c;hb=326586ba434fb873ebdb81f385ebe838419a98a7;hp=436533cc7378df09a6ab2a7ba8e431f106fc4a0a;hpb=e851736e8bd6c04f1805659d4783de2314ecb263;p=st.git diff --git a/st.c b/st.c index 436533c..73121ef 100644 --- a/st.c +++ b/st.c @@ -20,11 +20,11 @@ #include #include -#if defined(LINUX) +#if defined(__linux) #include -#elif defined(OPENBSD) +#elif defined(__OpenBSD__) || defined(__NetBSD__) #include -#elif defined(FREEBSD) +#elif defined(__FreeBSD__) || defined(__DragonFly__) #include #endif @@ -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; } @@ -1216,6 +1216,7 @@ void focus(XEvent *ev) { if((xw.hasfocus = ev->type == FocusIn)) xseturgency(0); + draw(SCREEN_UPDATE); } char*