Explicitly call textcolor() before clearing the desktop and clearing the windows.
This allows the desktop to have a different color than the windows on systems where textcolor() defines the character foreground and background.
The desktop is cleared with textcolor() set to the new macro BACKGROUNDCOLOR.
diff --git a/contiki/ctk/ctk-conio-service.c b/contiki/ctk/ctk-conio-service.c
index b3f1f33..b93aea8 100644
--- a/contiki/ctk/ctk-conio-service.c
+++ b/contiki/ctk/ctk-conio-service.c
@@ -29,7 +29,7 @@
*
* This file is part of the "ctk" console GUI toolkit for cc65
*
- * $Id: ctk-conio-service.c,v 1.1 2004/08/09 20:21:30 adamdunkels Exp $
+ * $Id: ctk-conio-service.c,v 1.2 2004/08/12 21:52:03 oliverschmidt Exp $
*
*/
@@ -282,7 +282,12 @@
unsigned char i;
unsigned char h;
-
+ if(focus & CTK_FOCUS_WINDOW) {
+ textcolor(WINDOWCOLOR_FOCUS);
+ } else {
+ textcolor(WINDOWCOLOR);
+ }
+
h = window->y + 2 + window->h;
/* Clear window contents. */
for(i = window->y + 2; i < h; ++i) {
@@ -444,6 +449,7 @@
{
unsigned char i;
+ textcolor(BACKGROUNDCOLOR);
for(i = y1; i < y2; ++i) {
cclearxy(0, i, sizex);
}