[vlc-commits] macosx: make sure the main window's position is correctly restored ( fixes #5856)
Felix Paul Kühne
git at videolan.org
Tue Jan 24 20:04:08 CET 2012
vlc | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Tue Jan 24 20:03:32 2012 +0100| [d832507736d33cb435ba1830e9bdbace89a68c2e] | committer: Felix Paul Kühne
macosx: make sure the main window's position is correctly restored (fixes #5856)
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d832507736d33cb435ba1830e9bdbace89a68c2e
---
modules/gui/macosx/MainWindow.m | 12 ++++--------
1 files changed, 4 insertions(+), 8 deletions(-)
diff --git a/modules/gui/macosx/MainWindow.m b/modules/gui/macosx/MainWindow.m
index ab273f0..1aba7e7 100644
--- a/modules/gui/macosx/MainWindow.m
+++ b/modules/gui/macosx/MainWindow.m
@@ -411,16 +411,15 @@ static VLCMainWindow *_o_sharedInstance = nil;
[self setOpaque: NO];
[self setHasShadow:YES];
- NSRect winrect;
+ NSRect winrect = [self frame];
CGFloat f_titleBarHeight = [o_titlebar_view frame].size.height;
- winrect = [self frame];
[o_titlebar_view setFrame: NSMakeRect( 0, winrect.size.height - f_titleBarHeight,
winrect.size.width, f_titleBarHeight )];
[[self contentView] addSubview: o_titlebar_view];
- winrect.size.height = winrect.size.height + f_titleBarHeight;
- [self setFrame: winrect display:NO animate:NO];
+ [self setFrame: winrect display:YES animate:YES];
+ previousSavedFrame = winrect;
winrect = [o_split_view frame];
winrect.size.height = winrect.size.height - f_titleBarHeight;
[o_split_view setFrame: winrect];
@@ -429,10 +428,6 @@ static VLCMainWindow *_o_sharedInstance = nil;
o_color_backdrop = [[VLCColorView alloc] initWithFrame: [o_split_view frame]];
[[self contentView] addSubview: o_color_backdrop positioned: NSWindowBelow relativeTo: o_split_view];
[o_color_backdrop setAutoresizingMask:NSViewHeightSizable | NSViewWidthSizable];
-
- previousSavedFrame = winrect;
-
- [self display];
}
else
{
@@ -891,6 +886,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
- (void)windowResizedOrMoved:(NSNotification *)notification
{
+ previousSavedFrame = [self frame];
[self saveFrameUsingName: [self frameAutosaveName]];
}
More information about the vlc-commits
mailing list