Merge "Fix a bug where window animation could be janky"