Fix let the main_view be anchored with the window.