x11_window: getPosition, check child!=NULL to avoid crashes