Use proper window area to calculate popup size
Merge branch 'fix_search_popup'