Calculate based on window visible frame
Dont forget to set else case
Position positioningRect using -alignmentRectForFrame:
Go back to using the median x and y to calculate mid origin x and y
Remove -didOffsetFrame
Remove -popoverAnchorPoint