cp.name = c.getName();
//set location relative to the nearest heavy weight ancestor
location = MouseDispatcher.convertPoint(c, 0, 0, parent);
}
if (parent != null) {
NativeWindow nativeParent = parent.getNativeWindow();
if (nativeParent == null) {
if (cp.child) {
return null; //component's window will be created when its parent is created ???
}
parent.mapToDisplay(true); //TODO: verify it
nativeParent = parent.getNativeWindow();
}
cp.parentId = nativeParent.getId();
}
cp.x = location.x;
cp.y = location.y;
cp.w = c.getWidth();
cp.h = c.getHeight();
recentNativeWindowComponent = c;
NativeWindow win = getWindowFactory().createWindow(cp);
nativeWindowCreated(win);
if (c instanceof Window) {
shutdownWatchdog.setWindowListEmpty(false);
}
return win;