Contextual menu should be hidden when main menu activated (Mac)

Observed on 1.0alpha, Mac (8a5469a, 2019-05-29).

Steps to reproduce:

  • Start with a new document.
  • Draw a rectangle.
  • With that rectangle selected, open its contextual menu, by right-clicking on it once.
  • With that contextual menu still open, select Path > Object to Path from the main menu.
  • While the menu command works correctly, the contextual menu remains behind, as a sort of "ghost"

ghost1

The ghost menu persists, even if you create other objects and open their menus:

ghost2

Expected behavior: The contextual menu should be hidden immediately when one clicks on the main menu (or other similar GUI features).