Repaired edge case for getWindowDisplay and alignment