aboutsummaryrefslogtreecommitdiffstats
path: root/src/gwin
diff options
context:
space:
mode:
authorinmarket <andrewh@inmarket.com.au>2014-03-05 13:43:39 +1000
committerinmarket <andrewh@inmarket.com.au>2014-03-05 13:43:39 +1000
commit68a0be8110d2dea408890f819bae443b9b476f84 (patch)
tree6561f5cf9a99aadee03b3258d0e4f921886b74f1 /src/gwin
parentccf05de456c5ff1ef4db9757eab5e81be8ae41fb (diff)
downloaduGFX-68a0be8110d2dea408890f819bae443b9b476f84.tar.gz
uGFX-68a0be8110d2dea408890f819bae443b9b476f84.tar.bz2
uGFX-68a0be8110d2dea408890f819bae443b9b476f84.zip
Fix to ensure correct clearing of consoles when being redrawn.
Diffstat (limited to 'src/gwin')
-rw-r--r--src/gwin/console.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/gwin/console.c b/src/gwin/console.c
index 53557fd6..fa93c79d 100644
--- a/src/gwin/console.c
+++ b/src/gwin/console.c
@@ -168,10 +168,17 @@
// Print the buffer
gwinPutCharArray(gh, gcw->buffer, gcw->bufpos);
- #if !GWIN_CONSOLE_USE_CLEAR_LINES
+ #if GWIN_CONSOLE_USE_CLEAR_LINES
// Clear the remaining space
- if (gcw->cy + fy < gh->height)
- gdispGFillArea(gh->display, gh->x, gh->y+gcw->cy+fy, gh->width, gh->height-(gcw->cy+fy), gh->bgcolor);
+ {
+ coord_t y;
+
+ y = gcw->cy;
+ if (gcw->cx)
+ y += gdispGetFontMetric(gh->font, fontHeight);
+ if (y < gh->height)
+ gdispGFillArea(gh->display, gh->x, gh->y+y, gh->width, gh->height-y, gh->bgcolor);
+ }
#endif
// Turn back on storing of buffer contents