问题
I have several NSViews that trigger re-draws during the mouseEntered and mouseExited methods.
When showing an NSMenu in the same window, updating of those NSViews is suspended (they don't get the mouseEntered and Exited events).
My problem is that once the NSMenu is closed (after moving the mouse all over the window outside of the NSMenu), every mouseEntered and Exited event that would have been triggered immediately trigger in a fast sequence. So basically they were queueing up and then unload (and redraw!) virtually at once.
How can I either stop those queued events from propagating once the NSMenu closes, or stop them from queueing all together?
Thanks
来源:https://stackoverflow.com/questions/35956364/stop-mouse-events-from-queueing-while-nsmenu-is-shown