[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:15:17 CEST 2012


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

macosx/mainwindow: added sanity check for the window size after restore (close #7275)

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

 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 bc82d73..06730f3 100644
--- a/modules/gui/macosx/MainWindow.m
+++ b/modules/gui/macosx/MainWindow.m
@@ -624,6 +624,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