Fix popup offset when top-level widget is moved on mac

See issue #416
Merge branch '416-popup-offset-on-mac'

* 416-popup-offset-on-mac:
  Fix popup offset when top-level widget is moved on mac