Support for resizing main window.