Resize window and viewport.