[vlc-commits] macosx/mainwindow: added sanity check for the window size after restore ( close #7275)

Felix Paul Kühne git at videolan.org
Tue Aug 7 20:20:54 CEST 2012


vlc/vlc-2.0 | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Tue Aug  7 20:15:09 2012 +0200| [e89094b16a9caf53f91511fee9713d07409f749f] | committer: Felix Paul Kühne

macosx/mainwindow: added sanity check for the window size after restore (close #7275)
(cherry picked from commit 4ee68dda548ef30ebe63e747fef92544b42c256a)

> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.0.git/?a=commit;h=e89094b16a9caf53f91511fee9713d07409f749f
---

 modules/gui/macosx/MainWindow.m |    8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/modules/gui/macosx/MainWindow.m b/modules/gui/macosx/MainWindow.m
index bb03971..1994bd1 100644
--- a/modules/gui/macosx/MainWindow.m
+++ b/modules/gui/macosx/MainWindow.m
@@ -613,6 +613,14 @@ static VLCMainWindow *_o_sharedInstance = nil;
         [self hideSplitView];
         i_lastSplitViewHeight = 300;
     }
+
+    /* sanity check for the window size */
+    frame = [self frame];
+    NSSize screenSize = [[self screen] frame].size;
+    if (screenSize.width <= frame.size.width || screenSize.height <= frame.size.height) {
+        nativeVideoSize = screenSize;
+        [self resizeWindow];
+    }
 }
 
 #pragma mark -



More information about the vlc-commits mailing list