aboutsummaryrefslogtreecommitdiffhomepage
path: root/video/out/cocoa
diff options
context:
space:
mode:
Diffstat (limited to 'video/out/cocoa')
-rw-r--r--video/out/cocoa/events_view.h1
-rw-r--r--video/out/cocoa/events_view.m13
-rw-r--r--video/out/cocoa/mpvadapter.h1
3 files changed, 3 insertions, 12 deletions
diff --git a/video/out/cocoa/events_view.h b/video/out/cocoa/events_view.h
index 6ad51cc133..91a6289be8 100644
--- a/video/out/cocoa/events_view.h
+++ b/video/out/cocoa/events_view.h
@@ -21,5 +21,4 @@
@interface MpvEventsView : NSView <NSDraggingDestination>
@property(nonatomic, retain) MpvCocoaAdapter *adapter;
- (BOOL)canHideCursor;
-- (void)signalMousePosition;
@end
diff --git a/video/out/cocoa/events_view.m b/video/out/cocoa/events_view.m
index f76ca0d617..d91c68046b 100644
--- a/video/out/cocoa/events_view.m
+++ b/video/out/cocoa/events_view.m
@@ -74,6 +74,9 @@
userInfo:nil] autorelease];
[self addTrackingArea:self.tracker];
+
+ if (![self containsMouseLocation])
+ [self.adapter putKey:MP_KEY_MOUSE_LEAVE withModifiers:0];
}
- (NSPoint)mouseLocation
@@ -148,8 +151,6 @@
if (self.clearing)
return;
-
- [self signalMousePosition];
}
- (NSPoint)convertPointToPixels:(NSPoint)point
@@ -162,14 +163,6 @@
return point;
}
-- (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];
-}
-
- (void)signalMouseMovement:(NSEvent *)event
{
NSPoint p = [self convertPointToPixels:[event locationInWindow]];
diff --git a/video/out/cocoa/mpvadapter.h b/video/out/cocoa/mpvadapter.h
index e547708e17..65832aeae5 100644
--- a/video/out/cocoa/mpvadapter.h
+++ b/video/out/cocoa/mpvadapter.h
@@ -28,7 +28,6 @@
- (void)handleFilesArray:(NSArray *)files;
- (void)didChangeWindowedScreenProfile:(NSNotification *)notification;
- (void)performAsyncResize:(NSSize)size;
-- (void)didChangeMousePosition;
- (BOOL)isInFullScreenMode;
- (BOOL)keyboardEnabled;