[Mac] Use Application.Invoke() instead of running pending events, and do this inside ShowContextMenu().