Fix popup and tooltip positioning when not fitting in the screen. Amend fa42ccea8.

# Conflicts:
#	docs/CHANGELOG.txt
4 files changed