summaryrefslogtreecommitdiffstats
path: root/video/out/cocoa/events_view.m
diff options
context:
space:
mode:
Diffstat (limited to 'video/out/cocoa/events_view.m')
-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 6dc9236c49..30fca1a332 100644
--- a/video/out/cocoa/events_view.m
+++ b/video/out/cocoa/events_view.m
@@ -206,6 +206,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];
}