[vlc-commits] vout/macosx: Remove useless access of NSWindow

Marvin Scholz git at videolan.org
Fri Feb 2 15:55:42 CET 2018


vlc/vlc-3.0 | branch: master | Marvin Scholz <epirat07 at gmail.com> | Tue Jan 30 14:40:37 2018 +0100| [4bc79a4e0ba2b222088e9c3151caa8233a873cc7] | committer: Jean-Baptiste Kempf

vout/macosx: Remove useless access of NSWindow

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.

(cherry picked from commit 89c1c9575b06bae5085234363c0d49770f020f7c)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=4bc79a4e0ba2b222088e9c3151caa8233a873cc7
---

 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 4a73950ff6..98e505cd00 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) {



More information about the vlc-commits mailing list