From 19bd69e5e335fbf2505d719d3860bcc1f51d3157 Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 12 Dec 2019 14:54:59 +0100 Subject: cocoa_common: remove deprecated VOCTRLs/VO_EVENTs See commit 4e4252f9169edc and the following as an example how this would have to be done if done properly. Since I'm unable to test on OSX, and nobody is interested in fixing this code (including myself, actually), just remove the deprecated definitions to make sure the code still builds. This will break runtime switching of fullscreen, ontop, border. (The way the minimized state is reported was also deprecated, but commit 40c2f2eeb05 already broke it anyway.) --- video/out/cocoa/window.m | 10 ---------- video/out/cocoa_common.m | 26 -------------------------- 2 files changed, 36 deletions(-) (limited to 'video') diff --git a/video/out/cocoa/window.m b/video/out/cocoa/window.m index 376298718b..011d8e4227 100644 --- a/video/out/cocoa/window.m +++ b/video/out/cocoa/window.m @@ -239,16 +239,6 @@ [self.adapter windowDidBecomeKey:notification]; } -- (void)windowDidMiniaturize:(NSNotification *)notification -{ - [self.adapter windowDidMiniaturize:notification]; -} - -- (void)windowDidDeminiaturize:(NSNotification *)notification -{ - [self.adapter windowDidDeminiaturize:notification]; -} - - (void)windowWillMove:(NSNotification *)notification { [self.adapter windowWillMove:notification]; diff --git a/video/out/cocoa_common.m b/video/out/cocoa_common.m index b4283bbe8d..4779d35a1f 100644 --- a/video/out/cocoa_common.m +++ b/video/out/cocoa_common.m @@ -867,15 +867,6 @@ static int vo_cocoa_control_on_main_thread(struct vo *vo, int request, void *arg struct vo_cocoa_state *s = vo->cocoa; switch (request) { - case VOCTRL_FULLSCREEN: - return vo_cocoa_fullscreen(vo); - case VOCTRL_GET_FULLSCREEN: - *(int *)arg = s->fullscreen; - 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; NSRect rect = (s->fullscreen || vo->opts->fullscreen) ? @@ -894,11 +885,6 @@ static int vo_cocoa_control_on_main_thread(struct vo *vo, int request, void *arg queue_new_video_size(vo, r.size.width, r.size.height); return VO_TRUE; } - case VOCTRL_GET_WIN_STATE: { - const bool minimized = [[s->view window] isMiniaturized]; - *(int *)arg = minimized ? VO_WIN_STATE_MINIMIZED : 0; - return VO_TRUE; - } case VOCTRL_SET_CURSOR_VISIBILITY: s->cursor_visibility_wanted = *(bool *)arg; return vo_cocoa_update_cursor_visibility(vo, false); @@ -1048,7 +1034,6 @@ int vo_cocoa_control(struct vo *vo, int *events, int request, void *arg) { struct vo_cocoa_state *s = self.vout->cocoa; s->fullscreen = 1; - s->pending_events |= VO_EVENT_FULLSCREEN_STATE; vo_cocoa_anim_unlock(self.vout); } @@ -1056,7 +1041,6 @@ int vo_cocoa_control(struct vo *vo, int *events, int request, void *arg) { struct vo_cocoa_state *s = self.vout->cocoa; s->fullscreen = 0; - s->pending_events |= VO_EVENT_FULLSCREEN_STATE; vo_cocoa_anim_unlock(self.vout); } @@ -1109,16 +1093,6 @@ int vo_cocoa_control(struct vo *vo, int *events, int request, void *arg) vo_cocoa_update_cursor_visibility(self.vout, false); } -- (void)windowDidMiniaturize:(NSNotification *)notification -{ - flag_events(self.vout, VO_EVENT_WIN_STATE); -} - -- (void)windowDidDeminiaturize:(NSNotification *)notification -{ - flag_events(self.vout, VO_EVENT_WIN_STATE); -} - - (void)windowWillMove:(NSNotification *)notification { self.vout->cocoa->window_is_dragged = true; -- cgit v1.2.3