diff --git a/src/gwin/gwin.c b/src/gwin/gwin.c index a9d9d823..7eb09f73 100644 --- a/src/gwin/gwin.c +++ b/src/gwin/gwin.c @@ -127,6 +127,12 @@ GHandle _gwindowCreate(GDisplay *g, GWindowObject *pgw, const GWindowInit *pInit _gwm_redim(pgw, pInit->x, pInit->y, pInit->width, pInit->height); #endif + #if GWIN_NEED_HIERARCHY + pgw->parent = NULL; + pgw->sibling = NULL; + pgw->child = NULL; + #endif + return (GHandle)pgw; } @@ -168,12 +174,6 @@ GHandle gwinGWindowCreate(GDisplay *g, GWindowObject *pgw, const GWindowInit *pI if (!(pgw = _gwindowCreate(g, pgw, pInit, &basegwinVMT, 0))) return 0; - #if GWIN_NEED_HIERARCHY - pgw->parent = NULL; - pgw->sibling = NULL; - pgw->child = NULL; - #endif - gwinSetVisible(pgw, pInit->show); return pgw;