aboutsummaryrefslogtreecommitdiffstats
path: root/src/gwin/gwin.c
diff options
context:
space:
mode:
authorJoel Bodenmann <joel@unormal.org>2014-01-05 22:37:01 +0100
committerJoel Bodenmann <joel@unormal.org>2014-01-05 22:37:01 +0100
commitfc984c3721b09b396424a51f3006491e026a5f97 (patch)
treec6d4462628eb6f8715129d5fee92a13bfc175d23 /src/gwin/gwin.c
parent1778a7f3b1917fceb8bc6b5d48a5548d4e1ee7b9 (diff)
downloaduGFX-fc984c3721b09b396424a51f3006491e026a5f97.tar.gz
uGFX-fc984c3721b09b396424a51f3006491e026a5f97.tar.bz2
uGFX-fc984c3721b09b396424a51f3006491e026a5f97.zip
gwinDestroy() does now redraw the parent if any
Diffstat (limited to 'src/gwin/gwin.c')
-rw-r--r--src/gwin/gwin.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/gwin/gwin.c b/src/gwin/gwin.c
index 923567ef..0f5245b2 100644
--- a/src/gwin/gwin.c
+++ b/src/gwin/gwin.c
@@ -193,7 +193,12 @@ void gwinDestroy(GHandle gh) {
gwinDestroy(tmp);
// remove myself from the hierarchy
- gwinRemoveChild(gh);
+ gwinRemoveChild(gh);
+
+ // issue a redraw of my parent if any
+ if (gh->parent) {
+ gwinRedraw(gh->parent);
+ }
#endif
// Make the window invisible
@@ -289,10 +294,8 @@ void gwinRedraw(GHandle gh) {
#if GWIN_NEED_HIERARCHY
GHandle tmp;
- if (gh->child) {
- for (tmp = gh->child; tmp; tmp = tmp->sibling)
- gwinRedraw(tmp);
- }
+ for (tmp = gh->child; tmp; tmp = tmp->sibling)
+ gwinRedraw(tmp);
#endif
}
@@ -372,7 +375,7 @@ void gwinRedraw(GHandle gh) {
void gwinClear(GHandle gh) {
/*
* Don't render anything when the window is not visible but
- * still call return gh->child->sibling;the AfterClear() routine as some widgets will
+ * still call tthe AfterClear() routine as some widgets will
* need this to clear internal buffers or similar
*/
if (!((gh->flags & GWIN_FLG_VISIBLE))) {