JUCE
JUCE copied to clipboard
Fixes #1442: MacOS addToDesktop w/ nativeWindowToAttachTo handles mouseMove incorrectly
When handling mouseMove on MacOS, check that the current peer is the topmost NSView before forwarding the events. Without this, a Component created via addDocumentWindow() with the nativeWindowToAttachTo argument set (i.e., creating a sub-NSView) would receive incorrect mouseExit events, as both it and its parent component would handle these mouseMove events, rapidly sending enter/exit messages back and forth between the two windows while the mouse moved.