From fc984c3721b09b396424a51f3006491e026a5f97 Mon Sep 17 00:00:00 2001 From: Joel Bodenmann Date: Sun, 5 Jan 2014 22:37:01 +0100 Subject: [PATCH] gwinDestroy() does now redraw the parent if any --- src/gwin/gwin.c | 15 +++++++++------ 1 file 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))) {