summaryrefslogtreecommitdiffstats
path: root/clock.c
diff options
context:
space:
mode:
authorTiago Cunha <tcunha@gmx.com>2009-08-26 22:11:00 +0000
committerTiago Cunha <tcunha@gmx.com>2009-08-26 22:11:00 +0000
commitfde3bda45398750a7128d242106f5aa1f85cc681 (patch)
treef93e8edfe236ba29df18fbba7b0c88da9dec313c /clock.c
parent1a5aba47c742844fc17526ac27d5a162250f7fec (diff)
Sync OpenBSD patchset 297:
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.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/clock.c b/clock.c
index bdd89c3b..3e2bbb7c 100644
--- a/clock.c
+++ b/clock.c
@@ -1,4 +1,4 @@
-/* $Id: clock.c,v 1.4 2009-05-04 17:58:25 nicm Exp $ */
+/* $Id: clock.c,v 1.5 2009-08-26 22:11:00 tcunha Exp $ */
/*
* Copyright (c) 2009 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -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;