diff options
| author | Aurélien Aptel <aurelien.aptel@gmail.com> | 2010-09-11 16:07:36 +0200 |
|---|---|---|
| committer | Aurélien Aptel <aurelien.aptel@gmail.com> | 2010-09-11 16:07:36 +0200 |
| commit | 6faedce53a8de8a81da1ba045ffbc2b7603128cd (patch) | |
| tree | 875c934d47f681310719c13de4087e6d69bc3e00 | |
| parent | don't draw if the window is not visible. (diff) | |
| download | st-6faedce53a8de8a81da1ba045ffbc2b7603128cd.tar.gz st-6faedce53a8de8a81da1ba045ffbc2b7603128cd.zip | |
s/hasfocus/focus/ for consistency.
| -rw-r--r-- | st.c | 8 |
1 files changed, 4 insertions, 4 deletions
| @@ -114,7 +114,7 @@ typedef struct { | |||
| 114 | int bufh; /* pixmap height */ | 114 | int bufh; /* pixmap height */ |
| 115 | int ch; /* char height */ | 115 | int ch; /* char height */ |
| 116 | int cw; /* char width */ | 116 | int cw; /* char width */ |
| 117 | int hasfocus; | 117 | int focus; |
| 118 | int vis; /* is visible */ | 118 | int vis; /* is visible */ |
| 119 | } XWindow; | 119 | } XWindow; |
| 120 | 120 | ||
| @@ -1043,7 +1043,7 @@ tputc(char c) { | |||
| 1043 | tnewline(); | 1043 | tnewline(); |
| 1044 | break; | 1044 | break; |
| 1045 | case '\a': | 1045 | case '\a': |
| 1046 | if(!xw.hasfocus) | 1046 | if(!xw.focus) |
| 1047 | xseturgency(1); | 1047 | xseturgency(1); |
| 1048 | break; | 1048 | break; |
| 1049 | case '\033': | 1049 | case '\033': |
| @@ -1286,7 +1286,7 @@ xdrawcursor(void) { | |||
| 1286 | xclear(oldx, oldy, oldx, oldy); | 1286 | xclear(oldx, oldy, oldx, oldy); |
| 1287 | 1287 | ||
| 1288 | /* draw the new one */ | 1288 | /* draw the new one */ |
| 1289 | if(!(term.c.state & CURSOR_HIDE) && xw.hasfocus) { | 1289 | if(!(term.c.state & CURSOR_HIDE) && xw.focus) { |
| 1290 | xdraws(&g.c, g, term.c.x, term.c.y, 1); | 1290 | xdraws(&g.c, g, term.c.x, term.c.y, 1); |
| 1291 | oldx = term.c.x, oldy = term.c.y; | 1291 | oldx = term.c.x, oldy = term.c.y; |
| 1292 | } | 1292 | } |
| @@ -1388,7 +1388,7 @@ xseturgency(int add) { | |||
| 1388 | 1388 | ||
| 1389 | void | 1389 | void |
| 1390 | focus(XEvent *ev) { | 1390 | focus(XEvent *ev) { |
| 1391 | if((xw.hasfocus = ev->type == FocusIn)) | 1391 | if((xw.focus = ev->type == FocusIn)) |
| 1392 | xseturgency(0); | 1392 | xseturgency(0); |
| 1393 | draw(SCREEN_UPDATE); | 1393 | draw(SCREEN_UPDATE); |
| 1394 | } | 1394 | } |
