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
commitad2fdab6b60e76305cac2fba9790d98545eaabd0 (patch)
treeae57316240fad85893f1ec1dd60998696d5f8c75
parent4657805ec509d67c5994a2c85388bfe687abf768 (diff)
downloadst-ad2fdab6b60e76305cac2fba9790d98545eaabd0.tar.gz
st-ad2fdab6b60e76305cac2fba9790d98545eaabd0.tar.bz2
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);
static void xdraws(char *, Glyph, int, int, int);
static void xhints(void);
static void xclear(int, int, int, int);
-static void xcursor(void);
+static void xdrawcursor(void);
static void xinit(void);
static void xloadcols(void);
@@ -1071,9 +1071,6 @@ xinit(void) {
/* colors */
xloadcols();
- term.c.attr.fg = DefaultFG;
- term.c.attr.bg = DefaultBG;
- term.c.attr.mode = ATTR_NULL;
/* windows */
xw.h = term.row * xw.ch + 2*BORDER;
xw.w = term.col * xw.cw + 2*BORDER;
@@ -1118,7 +1115,7 @@ xdraws(char *s, Glyph base, int x, int y, int len) {
}
void
-xcursor(void) {
+xdrawcursor(void) {
static int oldx = 0;
static int oldy = 0;
Glyph g = {' ', ATTR_NULL, DefaultBG, DefaultCS, 0};
@@ -1163,7 +1160,7 @@ draw(int dummy) {
if(term.line[y][x].state & GLYPH_SET)
xdrawc(x, y, term.line[y][x]);
- xcursor();
+ xdrawcursor();
XCopyArea(xw.dis, xw.buf, xw.win, dc.gc, 0, 0, xw.bufw, xw.bufh, BORDER, BORDER);
XFlush(xw.dis);
}
@@ -1199,7 +1196,7 @@ draw(int redraw_all) {
if(i > 0)
xdraws(buf, base, ox, y, i);
}
- xcursor();
+ xdrawcursor();
XCopyArea(xw.dis, xw.buf, xw.win, dc.gc, 0, 0, xw.bufw, xw.bufh, BORDER, BORDER);
XFlush(xw.dis);
}