tElement *ret;
tWindow *win;
- win = calloc(sizeof(tWindow) + 1);
+ win = calloc(1, sizeof(tWindow) + 1);
if(!win) return NULL;
- ret = &win->Element;
+ ret = &win->RootElement;
ret->Type = ELETYPE_WINDOW;
ret->Data = win;
ret->Parent = &App->MetaElement;