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.m71
1 files changed, 0 insertions, 71 deletions
diff --git a/video/out/cocoa/events_view.m b/video/out/cocoa/events_view.m
index 5de4a99eec..53d1da86ff 100644
--- a/video/out/cocoa/events_view.m
+++ b/video/out/cocoa/events_view.m
@@ -28,8 +28,6 @@
@property(nonatomic, assign) BOOL clearing;
@property(nonatomic, assign) BOOL hasMouseDown;
@property(nonatomic, retain) NSTrackingArea *tracker;
-- (BOOL)hasDock:(NSScreen*)screen;
-- (BOOL)hasMenubar:(NSScreen*)screen;
- (int)mpvButtonNumber:(NSEvent*)event;
- (void)mouseDownEvent:(NSEvent *)event;
- (void)mouseUpEvent:(NSEvent *)event;
@@ -51,54 +49,6 @@
return self;
}
-- (void)setFullScreen:(BOOL)willBeFullscreen
-{
- if (willBeFullscreen && ![self isInFullScreenMode]) {
- NSApplicationPresentationOptions popts =
- NSApplicationPresentationDefault;
-
- if ([self hasMenubar:[self.adapter fsScreen]])
- // Cocoa raises an exception when autohiding the menubar but
- // not the dock. They probably got bored while programming the
- // multi screen support and took some shortcuts (tested on 10.8).
- popts |= NSApplicationPresentationAutoHideMenuBar |
- NSApplicationPresentationAutoHideDock;
-
- if ([self hasDock:[self.adapter fsScreen]])
- popts |= NSApplicationPresentationAutoHideDock;
-
- NSDictionary *fsopts = @{
- NSFullScreenModeAllScreens : @([self.adapter fsModeAllScreens]),
- NSFullScreenModeApplicationPresentationOptions : @(popts)
- };
-
- // The original "windowed" window will stay around since sending a
- // view fullscreen wraps it in another window. This is noticeable when
- // sending the View fullscreen to another screen. Make it go away
- // manually.
- [self.window orderOut:self];
-
- [self enterFullScreenMode:[self.adapter fsScreen]
- withOptions:fsopts];
- }
-
- if (!willBeFullscreen && [self isInFullScreenMode]) {
- [self exitFullScreenModeWithOptions:nil];
-
- // Show the "windowed" window again.
- [self.window makeKeyAndOrderFront:self];
- [self.window makeFirstResponder:self];
- }
-}
-
-- (void)clear
-{
- if ([self isInFullScreenMode]) {
- self.clearing = YES;
- [self exitFullScreenModeWithOptions:nil];
- }
-}
-
// mpv uses flipped coordinates, because X11 uses those. So let's just use them
// as well without having to do any coordinate conversion of mouse positions.
- (BOOL)isFlipped { return YES; }
@@ -379,27 +329,6 @@
return NO;
}
-- (BOOL)hasDock:(NSScreen*)screen
-{
- NSRect vF = [screen visibleFrame];
- NSRect f = [screen frame];
- return
- // The visible frame's width is smaller: dock is on left or right end
- // of this method's receiver.
- vF.size.width < f.size.width ||
- // The visible frame's veritical origin is bigger: dock is
- // on the bottom of this method's receiver.
- vF.origin.y > f.origin.y;
-
-}
-
-- (BOOL)hasMenubar:(NSScreen*)screen
-{
- NSRect vF = [screen visibleFrame];
- NSRect f = [screen frame];
- return f.size.height + f.origin.y > vF.size.height + vF.origin.y;
-}
-
- (int)mpvButtonNumber:(NSEvent*)event
{
int buttonNumber = [event buttonNumber];