diff options
Diffstat (limited to 'src/gwin/gwin.c')
-rw-r--r-- | src/gwin/gwin.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/gwin/gwin.c b/src/gwin/gwin.c index ee0a7222..9b0fb03a 100644 --- a/src/gwin/gwin.c +++ b/src/gwin/gwin.c @@ -152,13 +152,16 @@ GHandle gwinGWindowCreate(GDisplay *g, GWindowObject *pgw, const GWindowInit *pI return pgw; } -void gwinDestroy(GHandle gh) { +void _gwinDestroy(GHandle gh, GRedrawMethod how) { if (!gh) return; // Make the window invisible gwinSetVisible(gh, FALSE); + // Make sure it is flushed first - must be REDRAW_WAIT or REDRAW_INSESSION + _gwinFlushRedraws(how); + #if GWIN_NEED_CONTAINERS // Notify the parent it is about to be deleted if (gh->parent && ((gcontainerVMT *)gh->parent->vmt)->NotifyDelete) @@ -182,6 +185,10 @@ void gwinDestroy(GHandle gh) { gh->flags = 0; // To be sure, to be sure } +void gwinDestroy(GHandle gh) { + _gwinDestroy(gh, REDRAW_WAIT); +} + const char *gwinGetClassName(GHandle gh) { return gh->vmt->classname; } |