Reduce duplicate code calculating popup position
Summary: The popup/exec if was duplicated three times, only to calculate the y position.
Reviewers: KWin, romangg, zzag
Reviewed By: KWin, romangg, zzag
Subscribers: zzag, romangg, kwin
Tags: KWin
Differential Revision: https://phabricator.kde.org/D23102