aboutsummaryrefslogtreecommitdiffstats
path: root/src/gwin
diff options
context:
space:
mode:
authorJoel Bodenmann <joel@unormal.org>2014-01-07 00:08:28 +0100
committerJoel Bodenmann <joel@unormal.org>2014-01-07 00:08:28 +0100
commitbb91a78156fad81f39c70289756c4e2db5fdf322 (patch)
treeac0dd3fc1434c15ce4eb479a251c51922998185f /src/gwin
parentff09f09a0c9ab4f7ec069cf42b2ba34e161db3be (diff)
downloaduGFX-bb91a78156fad81f39c70289756c4e2db5fdf322.tar.gz
uGFX-bb91a78156fad81f39c70289756c4e2db5fdf322.tar.bz2
uGFX-bb91a78156fad81f39c70289756c4e2db5fdf322.zip
gwinClear()
Diffstat (limited to 'src/gwin')
-rw-r--r--src/gwin/gwin.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/src/gwin/gwin.c b/src/gwin/gwin.c
index 0e26149f..9e0df7f8 100644
--- a/src/gwin/gwin.c
+++ b/src/gwin/gwin.c
@@ -332,8 +332,6 @@ void gwinRedraw(GHandle gh) {
child->y += parent->y;
// redraw the window
- gwinClear(child);
- gwinClear(parent);
gwinRedraw(parent);
}
@@ -389,14 +387,20 @@ void gwinClear(GHandle gh) {
gh->vmt->AfterClear(gh);
} else {
- #if GDISP_NEED_CLIP
- gdispGSetClip(gh->display, gh->x, gh->y, gh->width, gh->height);
- #endif
+ #if GDISP_NEED_CLIP
+ gdispGSetClip(gh->display, gh->x, gh->y, gh->width, gh->height);
+ #endif
- gdispGFillArea(gh->display, gh->x, gh->y, gh->width, gh->height, gh->bgcolor);
- if (gh->vmt->AfterClear)
- gh->vmt->AfterClear(gh);
+ gdispGFillArea(gh->display, gh->x, gh->y, gh->width, gh->height, gh->bgcolor);
+ if (gh->vmt->AfterClear)
+ gh->vmt->AfterClear(gh);
}
+
+ #if GWIN_NEED_HIERARCHY
+ GHandle tmp;
+ for (tmp = gh->child; tmp; tmp = tmp->sibling)
+ gwinClear(tmp);
+ #endif
}
void gwinDrawPixel(GHandle gh, coord_t x, coord_t y) {