Commit 9434662c authored by David's avatar David

macosx: fix window ordering during startup (close #14486)

According to docu, application:willFinishLaunching: will be called
as one of the first steps of [NSApp run], before the main loop
will be actually started. Thus, it should make no performance
difference if we load the main window already in openIntf().

For some unknown reasons, a direct call to makeKeyAndOrderFront
works in run(), but not in app:willFinishLaunching:, though.
parent cc07bce0
......@@ -132,6 +132,9 @@ int OpenIntf (vlc_object_t *p_this)
[NSBundle loadNibNamed: @"MainMenu" owner: NSApp];
[NSBundle loadNibNamed:@"MainWindow" owner: [VLCMain sharedInstance]];
[[[VLCMain sharedInstance] mainWindow] makeKeyAndOrderFront:nil];
[o_pool release];
......@@ -769,12 +772,6 @@ static VLCMain *_o_sharedMainInstance = nil;
items_at_launch = p_playlist->p_local_category->i_children;
[NSBundle loadNibNamed:@"MainWindow" owner: self];
// This cannot be called directly here, as the main loop is not running yet so it would have no effect.
// So lets enqueue it into the loop for later execution.
[o_mainwindow performSelector:@selector(makeKeyAndOrderFront:) withObject:nil afterDelay:0];
[[SUUpdater sharedUpdater] setDelegate:self];
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