Handle window resizing.