activate new mainwindow, fix #314