[vlc-devel] [PATCH 2/4] macosx: fix start and end rect of fullscreen animation when we have a non-embedded vout-window
David Fuhrmann
david.fuhrmann at googlemail.com
Tue Feb 7 09:43:17 CET 2012
---
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 7a1f863..df8158d 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];
--
1.7.5.4
More information about the vlc-devel
mailing list