summaryrefslogtreecommitdiffstats
path: root/clock.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@openbsd.org>2009-08-26 16:16:06 +0000
committerNicholas Marriott <nicm@openbsd.org>2009-08-26 16:16:06 +0000
commit1ba5ce9cb3992f3a5f7ff41975c370540678e815 (patch)
tree61cde450b3add90656a4c541cfd95ad94e00d3ec /clock.c
parentf949107a32fed3f1bab6ac4227a7c6b03b233643 (diff)
Fix clock mode in black and white terminals now that tty.c tries to fix
reverse.
Diffstat (limited to 'clock.c')
-rw-r--r--clock.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/clock.c b/clock.c
index 60248f47..275861a9 100644
--- a/clock.c
+++ b/clock.c
@@ -113,7 +113,7 @@ clock_draw(struct screen_write_ctx *ctx, u_int colour, int style)
screen_write_clearscreen(ctx);
memcpy(&gc, &grid_default_cell, sizeof gc);
- gc.fg = colour;
+ gc.bg = colour;
if (screen_size_x(s) < 6 * strlen(tim) || screen_size_y(s) < 6) {
if (screen_size_x(s) >= strlen(tim) && screen_size_y(s) != 0) {
@@ -147,13 +147,10 @@ clock_draw(struct screen_write_ctx *ctx, u_int colour, int style)
}
for (j = 0; j < 5; j++) {
- screen_write_cursormove(ctx, x, y + j);
for (i = 0; i < 5; i++) {
+ screen_write_cursormove(ctx, x + i, y + j);
if (clock_table[idx][j][i])
- gc.attr |= GRID_ATTR_REVERSE;
- else
- gc.attr &= ~GRID_ATTR_REVERSE;
- screen_write_putc(ctx, &gc, ' ');
+ screen_write_putc(ctx, &gc, ' ');
}
}
x += 6;