s/hasfocus/focus/ for consistency.

dev
Aurélien Aptel 2010-09-11 16:07:36 +02:00
parent ab7037cb33
commit 6faedce53a
1 changed files with 4 additions and 4 deletions

8
st.c
View File

@ -114,7 +114,7 @@ typedef struct {
int bufh; /* pixmap height */ int bufh; /* pixmap height */
int ch; /* char height */ int ch; /* char height */
int cw; /* char width */ int cw; /* char width */
int hasfocus; int focus;
int vis; /* is visible */ int vis; /* is visible */
} XWindow; } XWindow;
@ -1043,7 +1043,7 @@ tputc(char c) {
tnewline(); tnewline();
break; break;
case '\a': case '\a':
if(!xw.hasfocus) if(!xw.focus)
xseturgency(1); xseturgency(1);
break; break;
case '\033': case '\033':
@ -1286,7 +1286,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) && xw.hasfocus) { if(!(term.c.state & CURSOR_HIDE) && xw.focus) {
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;
} }
@ -1388,7 +1388,7 @@ xseturgency(int add) {
void void
focus(XEvent *ev) { focus(XEvent *ev) {
if((xw.hasfocus = ev->type == FocusIn)) if((xw.focus = ev->type == FocusIn))
xseturgency(0); xseturgency(0);
draw(SCREEN_UPDATE); draw(SCREEN_UPDATE);
} }