Window resizing working