Allow for using a custom main window type.