[vlc-devel] [PATCH 1/2] vout/macosx: Remove useless access of NSWindow

Marvin Scholz epirat07 at gmail.com
Tue Jan 30 15:51:36 CET 2018


The window is only ever used to query its minSize, which is then not
used anywhere in the following code, so this code can be removed.
---
 modules/video_output/macosx.m | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/modules/video_output/macosx.m b/modules/video_output/macosx.m
index 1e519988cd..d527f2f819 100644
--- a/modules/video_output/macosx.m
+++ b/modules/video_output/macosx.m
@@ -366,14 +366,6 @@ static int Control (vout_display_t *vd, int query, va_list ap)
             case VOUT_DISPLAY_CHANGE_SOURCE_CROP:
             case VOUT_DISPLAY_CHANGE_DISPLAY_SIZE:
             {
-
-                id o_window = [sys->glView window];
-                if (!o_window) {
-                    return VLC_SUCCESS; // this is okay, since the event will occur again when we have a window
-                }
-
-                NSSize windowMinSize = [o_window minSize];
-
                 const vout_display_cfg_t *cfg;
 
                 if (query == VOUT_DISPLAY_CHANGE_SOURCE_ASPECT || query == VOUT_DISPLAY_CHANGE_SOURCE_CROP) {
-- 
2.14.3 (Apple Git-98)



More information about the vlc-devel mailing list