The event received in
come from widgets with a GdkWindow. In those cases the coordinates
are relative to the widget, not the root window.
This results in a misplaced window menu.
Properly calculate the coordinates by iterating to the toplevel window as suggested by Carlos Garnacho.
Fixes #1781 (closed)