summaryrefslogtreecommitdiffstats
path: root/video/out/cocoa_common.m
diff options
context:
space:
mode:
authorAkemi <der.richter@gmx.de>2017-01-14 17:10:08 +0100
committerAkemi <der.richter@gmx.de>2017-01-19 14:54:22 +0100
commitfe02e5023c4966a4d97a0999eca92c68be8aa15e (patch)
tree27225b950fa9cc08d571d5bf731de6725beb12f6 /video/out/cocoa_common.m
parent202f9b218af093e2002bf2551b44afffcba26f7d (diff)
downloadmpv-fe02e5023c4966a4d97a0999eca92c68be8aa15e.tar.bz2
mpv-fe02e5023c4966a4d97a0999eca92c68be8aa15e.tar.xz
cocoa: move updateBorder method to the protocol
we are calling the method on a NSWindow object that may not respond to that call, since its a method of MpvVideoWindow. add the method to our protocol and rename that protocol to reflect the change.
Diffstat (limited to 'video/out/cocoa_common.m')
-rw-r--r--video/out/cocoa_common.m5
1 files changed, 3 insertions, 2 deletions
diff --git a/video/out/cocoa_common.m b/video/out/cocoa_common.m
index d00d5d78c7..bf702c4cd4 100644
--- a/video/out/cocoa_common.m
+++ b/video/out/cocoa_common.m
@@ -146,7 +146,7 @@ static void queue_new_video_size(struct vo *vo, int w, int h)
{
struct vo_cocoa_state *s = vo->cocoa;
struct mp_vo_opts *opts = vo->opts;
- id<MpvSizing> win = (id<MpvSizing>) s->window;
+ id<MpvWindowUpdate> win = (id<MpvWindowUpdate>) s->window;
NSRect r = calculate_window_geometry(vo, NSMakeRect(0, 0, w, h));
[win queueNewVideoSize:NSMakeSize(r.size.width, r.size.height)];
}
@@ -592,7 +592,8 @@ static int vo_cocoa_window_border(struct vo *vo)
return VO_NOTIMPL;
struct mp_vo_opts *opts = vo->opts;
- [s->window updateBorder:opts->border];
+ id<MpvWindowUpdate> win = (id<MpvWindowUpdate>) s->window;
+ [win updateBorder:opts->border];
if (opts->border)
cocoa_set_window_title(vo);