[vlc-commits] macosx: fix start and end rect of fullscreen animation when we have a non-embedded vout-window

David Fuhrmann git at videolan.org
Tue Feb 7 10:33:00 CET 2012


vlc/vlc-2.0 | branch: master | David Fuhrmann <david.fuhrmann at googlemail.com> | Tue Feb  7 09:43:17 2012 +0100| [a13d32fb4b0ae02ca12d607a4c4067d42de1bfad] | committer: Felix Paul Kühne

macosx: fix start and end rect of fullscreen animation when we have a non-embedded vout-window

Signed-off-by: Felix Paul Kühne <fkuehne at videolan.org>
(cherry picked from commit 7ecb24c8689710e32f71e20d2cc51ae5b57e7151)

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

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

diff --git a/modules/gui/macosx/MainWindow.m b/modules/gui/macosx/MainWindow.m
index 9894893..2f26503 100644
--- a/modules/gui/macosx/MainWindow.m
+++ b/modules/gui/macosx/MainWindow.m
@@ -1370,8 +1370,8 @@ static VLCMainWindow *_o_sharedInstance = nil;
         /* We can't change the styleMask of an already created NSWindow, so we create another window, and do eye catching stuff */
 
         rect = [[o_video_view superview] convertRect: [o_video_view frame] toView: nil]; /* Convert to Window base coord */
-        rect.origin.x += [self frame].origin.x;
-        rect.origin.y += [self frame].origin.y;
+        rect.origin.x += [[o_video_view window] frame].origin.x;
+        rect.origin.y += [[o_video_view window] frame].origin.y;
         o_fullscreen_window = [[VLCWindow alloc] initWithContentRect:rect styleMask: NSBorderlessWindowMask backing:NSBackingStoreBuffered defer:YES];
         [o_fullscreen_window setBackgroundColor: [NSColor blackColor]];
         [o_fullscreen_window setCanBecomeKeyWindow: YES];
@@ -1602,8 +1602,9 @@ static VLCMainWindow *_o_sharedInstance = nil;
     }
 
     frame = [[o_temp_view superview] convertRect: [o_temp_view frame] toView: nil]; /* Convert to Window base coord */
-    frame.origin.x += [self frame].origin.x;
-    frame.origin.y += [self frame].origin.y;
+    id targetWindow = b_nonembedded ? o_nonembedded_window : self;
+    frame.origin.x += [targetWindow frame].origin.x;
+    frame.origin.y += [targetWindow frame].origin.y;
 
     dict2 = [[NSMutableDictionary alloc] initWithCapacity:2];
     [dict2 setObject:self forKey:NSViewAnimationTargetKey];



More information about the vlc-commits mailing list