Commit d3415155 authored by Felix Paul Kühne's avatar Felix Paul Kühne

macosx: save window position manually when using the dark interface style

parent 12179aca
......@@ -133,6 +133,7 @@
- (void)setTitle:(NSString *)title;
- (void) customZoom: (id)sender;
- (void)windowResizedOrMoved:(NSNotification *)notification;
- (void)showDropZone;
- (void)hideDropZone;
......
......@@ -109,6 +109,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
- (void)dealloc
{
[[NSNotificationCenter defaultCenter] removeObserver: self];
config_PutInt( VLCIntf->p_libvlc, "volume", i_lastShownVolume );
[self saveFrameUsingName: [self frameAutosaveName]];
[o_sidebaritems release];
......@@ -394,6 +395,9 @@ static VLCMainWindow *_o_sharedInstance = nil;
if( b_dark_interface )
{
[[NSNotificationCenter defaultCenter] addObserver: self selector: @selector(windowResizedOrMoved:) name: NSWindowDidResizeNotification object: nil];
[[NSNotificationCenter defaultCenter] addObserver: self selector: @selector(windowResizedOrMoved:) name: NSWindowDidMoveNotification object: nil];
NSRect winrect;
CGFloat f_titleBarHeight = [o_titlebar_view frame].size.height;
winrect = [self frame];
......@@ -797,6 +801,11 @@ static VLCMainWindow *_o_sharedInstance = nil;
[self setFrame: maxRect display: YES animate: YES];
}
- (void)windowResizedOrMoved:(NSNotification *)notification
{
[self saveFrameUsingName: [self frameAutosaveName]];
}
#pragma mark -
#pragma mark Update interface and respond to foreign events
- (void)showDropZone
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment