aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAurélien Aptel <aurelien.aptel@gmail.com>2010-08-30 01:45:57 +0200
committerAurélien Aptel <aurelien.aptel@gmail.com>2010-08-30 01:45:57 +0200
commit188293c828033fd7ff74d753239b3a5052b372a2 (patch)
treeae57316240fad85893f1ec1dd60998696d5f8c75
parent7d88cf88d05c5f5fffbe096da9fac79d7d8957f9 (diff)
downloadst-188293c828033fd7ff74d753239b3a5052b372a2.tar.gz
st-188293c828033fd7ff74d753239b3a5052b372a2.zip
removed useless cursor init. and renamed xcursor() to xdrawcursor().
-rw-r--r--st.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/st.c b/st.c
index 6dcded5..36ff43c 100644
--- a/st.c
+++ b/st.c
@@ -165,7 +165,7 @@ static void xbell(void);
165static void xdraws(char *, Glyph, int, int, int); 165static void xdraws(char *, Glyph, int, int, int);
166static void xhints(void); 166static void xhints(void);
167static void xclear(int, int, int, int); 167static void xclear(int, int, int, int);
168static void xcursor(void); 168static void xdrawcursor(void);
169static void xinit(void); 169static void xinit(void);
170static void xloadcols(void); 170static void xloadcols(void);
171 171
@@ -1071,9 +1071,6 @@ xinit(void) {
1071 /* colors */ 1071 /* colors */
1072 xloadcols(); 1072 xloadcols();
1073 1073
1074 term.c.attr.fg = DefaultFG;
1075 term.c.attr.bg = DefaultBG;
1076 term.c.attr.mode = ATTR_NULL;
1077 /* windows */ 1074 /* windows */
1078 xw.h = term.row * xw.ch + 2*BORDER; 1075 xw.h = term.row * xw.ch + 2*BORDER;
1079 xw.w = term.col * xw.cw + 2*BORDER; 1076 xw.w = term.col * xw.cw + 2*BORDER;
@@ -1118,7 +1115,7 @@ xdraws(char *s, Glyph base, int x, int y, int len) {
1118} 1115}
1119 1116
1120void 1117void
1121xcursor(void) { 1118xdrawcursor(void) {
1122 static int oldx = 0; 1119 static int oldx = 0;
1123 static int oldy = 0; 1120 static int oldy = 0;
1124 Glyph g = {' ', ATTR_NULL, DefaultBG, DefaultCS, 0}; 1121 Glyph g = {' ', ATTR_NULL, DefaultBG, DefaultCS, 0};
@@ -1163,7 +1160,7 @@ draw(int dummy) {
1163 if(term.line[y][x].state & GLYPH_SET) 1160 if(term.line[y][x].state & GLYPH_SET)
1164 xdrawc(x, y, term.line[y][x]); 1161 xdrawc(x, y, term.line[y][x]);
1165 1162
1166 xcursor(); 1163 xdrawcursor();
1167 XCopyArea(xw.dis, xw.buf, xw.win, dc.gc, 0, 0, xw.bufw, xw.bufh, BORDER, BORDER); 1164 XCopyArea(xw.dis, xw.buf, xw.win, dc.gc, 0, 0, xw.bufw, xw.bufh, BORDER, BORDER);
1168 XFlush(xw.dis); 1165 XFlush(xw.dis);
1169} 1166}
@@ -1199,7 +1196,7 @@ draw(int redraw_all) {
1199 if(i > 0) 1196 if(i > 0)
1200 xdraws(buf, base, ox, y, i); 1197 xdraws(buf, base, ox, y, i);
1201 } 1198 }
1202 xcursor(); 1199 xdrawcursor();
1203 XCopyArea(xw.dis, xw.buf, xw.win, dc.gc, 0, 0, xw.bufw, xw.bufh, BORDER, BORDER); 1200 XCopyArea(xw.dis, xw.buf, xw.win, dc.gc, 0, 0, xw.bufw, xw.bufh, BORDER, BORDER);
1204 XFlush(xw.dis); 1201 XFlush(xw.dis);
1205} 1202}