[vlc-commits] macosx: support the Lion-style resizing within the black main window when _compiling_ (no joke) on Lion

Felix Paul Kühne git at videolan.org
Fri Dec 23 21:17:43 CET 2011


vlc/vlc-1.2 | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Fri Dec 23 19:53:08 2011 +0100| [3050c601d9093a5b0525d0343ad8cef3c4e9e177] | committer: Jean-Baptiste Kempf

macosx: support the Lion-style resizing within the black main window when _compiling_ (no joke) on Lion
(cherry picked from commit c30858cfe6e1ca7d0e9d6c7cbc626c736c3fa542)

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-1.2.git/?a=commit;h=3050c601d9093a5b0525d0343ad8cef3c4e9e177
---

 modules/gui/macosx/MainWindow.m |   20 +++++++++-----------
 1 files changed, 9 insertions(+), 11 deletions(-)

diff --git a/modules/gui/macosx/MainWindow.m b/modules/gui/macosx/MainWindow.m
index 80da8a2..2c2fd29 100644
--- a/modules/gui/macosx/MainWindow.m
+++ b/modules/gui/macosx/MainWindow.m
@@ -73,17 +73,14 @@ static VLCMainWindow *_o_sharedInstance = nil;
     b_dark_interface = config_GetInt( VLCIntf, "macosx-interfacestyle" );
 
     if (b_dark_interface)
-    {
+#ifdef MAC_OS_X_VERSION_10_7
+        styleMask = NSBorderlessWindowMask | NSResizableWindowMask;
+#else
         styleMask = NSBorderlessWindowMask;
-        self = [super initWithContentRect:contentRect styleMask:styleMask
-                                  backing:backingType defer:flag];
-    }
-    else
-    {
-        self = [super initWithContentRect:contentRect styleMask:styleMask
-                                  backing:backingType defer:flag];
-    }
-        
+#endif
+
+    self = [super initWithContentRect:contentRect styleMask:styleMask
+                              backing:backingType defer:flag];
 
     [[VLCMain sharedInstance] updateTogglePlaylistState];
 
@@ -401,6 +398,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
         winrect.size.height = winrect.size.height - f_titleBarHeight;
         [o_split_view setFrame: winrect];
         [o_video_view setFrame: winrect];
+
         [self display];
     }
     else
@@ -916,7 +914,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
         if ([o_video_view window] != self)
         {
             [o_video_view removeFromSuperviewWithoutNeedingDisplay];
-            [o_video_view setFrame: [o_right_split_view frame]];
+            [o_video_view setFrame: [o_split_view frame]];
             [[self contentView] addSubview:o_video_view positioned:NSWindowAbove relativeTo:nil];
         }
         b_nonembedded = NO;



More information about the vlc-commits mailing list