summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--video/out/cocoa/events_view.m2
1 files changed, 2 insertions, 0 deletions
diff --git a/video/out/cocoa/events_view.m b/video/out/cocoa/events_view.m
index 20d1307abf..7c8283ad72 100644
--- a/video/out/cocoa/events_view.m
+++ b/video/out/cocoa/events_view.m
@@ -209,6 +209,8 @@
- (void)signalMousePosition
{
NSPoint p = [self convertPointToPixels:[self mouseLocation]];
+ p.x = MIN(MAX(p.x, 0), self.bounds.size.width-1);
+ p.y = MIN(MAX(p.y, 0), self.bounds.size.height-1);
[self.adapter signalMouseMovement:p];
}