Fix tearing during Window resizing.