diff options
author | Akemi <der.richter@gmx.de> | 2016-12-15 22:12:46 +0100 |
---|---|---|
committer | Akemi <der.richter@gmx.de> | 2017-01-11 14:17:33 +0100 |
commit | 46b74a38f11e9ff2808fc151a329a260d4ac8d90 (patch) | |
tree | 6c05c8db33f5b76a9461f3a48d8a8b44c2a54cd5 /video/out/cocoa_common.m | |
parent | a05c5b4ec64da5630a29e9507357e662675e22e4 (diff) | |
download | mpv-46b74a38f11e9ff2808fc151a329a260d4ac8d90.tar.bz2 mpv-46b74a38f11e9ff2808fc151a329a260d4ac8d90.tar.xz |
cocoa: add border cycling
Fixes #2430
Diffstat (limited to 'video/out/cocoa_common.m')
-rw-r--r-- | video/out/cocoa_common.m | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/video/out/cocoa_common.m b/video/out/cocoa_common.m index f4d2562acd..58b0df518f 100644 --- a/video/out/cocoa_common.m +++ b/video/out/cocoa_common.m @@ -552,6 +552,20 @@ static int cocoa_set_window_title(struct vo *vo) return VO_TRUE; } +static int vo_cocoa_window_border(struct vo *vo) +{ + struct vo_cocoa_state *s = vo->cocoa; + if (s->embedded) + return VO_NOTIMPL; + + struct mp_vo_opts *opts = vo->opts; + [s->window updateBorder:opts->border]; + if (opts->border) + cocoa_set_window_title(vo); + + return VO_TRUE; +} + static void cocoa_screen_reconfiguration_observer( CGDirectDisplayID display, CGDisplayChangeSummaryFlags flags, void *ctx) { @@ -747,6 +761,8 @@ static int vo_cocoa_control_on_main_thread(struct vo *vo, int request, void *arg return VO_TRUE; case VOCTRL_ONTOP: return vo_cocoa_ontop(vo); + case VOCTRL_BORDER: + return vo_cocoa_window_border(vo); case VOCTRL_GET_UNFS_WINDOW_SIZE: { int *sz = arg; NSSize size = [s->view frame].size; |