Merge "Revert "Improve AnchoredWindow with smart positioning logic.""