pos() includes the window frame, replace by mapToGlobal to avoid out of bounds screen position. Approved by: nc (maintainer) PR: 257778