Workaround for a wxWidget bug, where the mouse down event comes before mouse enter event after a pop-up menu is closed.