[vlc-commits] macosx: don't let the vout resize the window if we are in Lion' s fullscreen mode

Felix Paul Kühne git at videolan.org
Tue Aug 16 15:19:16 CEST 2011


vlc | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Tue Aug 16 14:31:03 2011 +0200| [cfd14b541f8033aad59fb9ec6594bf5eed93743b] | committer: Felix Paul Kühne

macosx: don't let the vout resize the window if we are in Lion's fullscreen mode

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

 modules/gui/macosx/MainWindow.m |    2 +-
 modules/video_output/macosx.m   |   11 +++++++----
 2 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/modules/gui/macosx/MainWindow.m b/modules/gui/macosx/MainWindow.m
index 2c9790f..2371960 100644
--- a/modules/gui/macosx/MainWindow.m
+++ b/modules/gui/macosx/MainWindow.m
@@ -856,7 +856,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
 
 - (void)resizeWindow
 {
-    if ( !b_fullscreen )
+    if ( !b_fullscreen && !(NSAppKitVersionNumber >= 1115.2 && [NSApp currentSystemPresentationOptions] == NSApplicationPresentationFullScreen) )
     {
         NSPoint topleftbase;
         NSPoint topleftscreen;
diff --git a/modules/video_output/macosx.m b/modules/video_output/macosx.m
index d1f0df9..2716761 100644
--- a/modules/video_output/macosx.m
+++ b/modules/video_output/macosx.m
@@ -477,10 +477,13 @@ static void OpenglSwap(vlc_gl_t *gl)
  */
 - (void)setWindowFrameWithValue:(NSValue *)value
 {
-    NSRect frame = [value rectValue];
-    if (frame.origin.x <= 0.0 && frame.origin.y <= 0.0)
-        [[self window] center];
-    [[self window] setFrame:frame display:YES animate: YES];
+    if (!(NSAppKitVersionNumber >= 1115.2 && [NSApp currentSystemPresentationOptions] == NSApplicationPresentationFullScreen))
+    {
+        NSRect frame = [value rectValue];
+        if (frame.origin.x <= 0.0 && frame.origin.y <= 0.0)
+            [[self window] center];
+        [[self window] setFrame:frame display:YES animate: YES];
+    }
 }
 
 /**



More information about the vlc-commits mailing list