1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-09 23:34:20 +00:00

NSViewComponentPeer: Only forward a mouse move event if the view is not occluded by a child view

This commit is contained in:
reuk 2024-10-29 20:56:06 +00:00
parent fcf62ab105
commit b108fe26c3
No known key found for this signature in database
GPG key ID: FCB43929F012EE5C

View file

@ -754,7 +754,10 @@ public:
NSPoint screenPos = [[ev window] convertRectToScreen: NSMakeRect (windowPos.x, windowPos.y, 1.0f, 1.0f)].origin;
if (isWindowAtPoint ([ev window], screenPos))
sendMouseEvent (ev);
{
if (contains (getMousePos (ev, view).roundToInt(), false))
sendMouseEvent (ev);
}
else
// moved into another window which overlaps this one, so trigger an exit
handleMouseEvent (MouseInputSource::InputSourceType::mouse, MouseInputSource::offscreenMousePos, ModifierKeys::currentModifiers,