@@ -1669,7 +1669,7 @@ - (void)keyUp:(NSEvent *)event {
1669
1669
1670
1670
#pragma mark - Mouse Events
1671
1671
1672
- - (void )sendMouseEvent:( BOOL )isMouseOver {
1672
+ - (void )emitMouseEvent {
1673
1673
if (!_eventEmitter) {
1674
1674
return ;
1675
1675
}
@@ -1690,7 +1690,7 @@ - (void)sendMouseEvent:(BOOL)isMouseOver {
1690
1690
.metaKey = static_cast <bool >(modifierFlags & NSEventModifierFlagCommand),
1691
1691
};
1692
1692
1693
- if (isMouseOver ) {
1693
+ if (_hasMouseOver ) {
1694
1694
_eventEmitter->onMouseEnter (mouseEvent);
1695
1695
} else {
1696
1696
_eventEmitter->onMouseLeave (mouseEvent);
@@ -1709,7 +1709,7 @@ - (void)updateMouseOverIfNeeded
1709
1709
NSPoint locationInView = [self convertPoint: locationInWindow fromView: nil ];
1710
1710
BOOL insideBounds = NSPointInRect (locationInView, self.visibleRect );
1711
1711
1712
- // On macOS 14.0 visibleRect can be larger than the view bounds
1712
+ // On macOS 14+ visibleRect can be larger than the view bounds
1713
1713
insideBounds &= NSPointInRect (locationInView, self.bounds );
1714
1714
1715
1715
if (hasMouseOver && !insideBounds) {
@@ -1722,7 +1722,7 @@ - (void)updateMouseOverIfNeeded
1722
1722
1723
1723
if (hasMouseOver != _hasMouseOver) {
1724
1724
_hasMouseOver = hasMouseOver;
1725
- [self sendMouseEvent: hasMouseOver ];
1725
+ [self emitMouseEvent ];
1726
1726
}
1727
1727
}
1728
1728
@@ -1795,7 +1795,7 @@ - (void)mouseEntered:(NSEvent *)event
1795
1795
}
1796
1796
1797
1797
_hasMouseOver = YES ;
1798
- [self sendMouseEvent: _hasMouseOver ];
1798
+ [self emitMouseEvent ];
1799
1799
}
1800
1800
1801
1801
- (void )mouseExited:(NSEvent *)event
@@ -1805,7 +1805,7 @@ - (void)mouseExited:(NSEvent *)event
1805
1805
}
1806
1806
1807
1807
_hasMouseOver = NO ;
1808
- [self sendMouseEvent: _hasMouseOver ];
1808
+ [self emitMouseEvent ];
1809
1809
}
1810
1810
#endif // macOS]
1811
1811
0 commit comments