[vlc-commits] macosx: fix main window appearing with a delay of some seconds

David Fuhrmann git at videolan.org
Sat Apr 11 20:49:28 CEST 2015


vlc/vlc-2.2 | branch: master | David Fuhrmann <dfuhrmann at videolan.org> | Sat Apr 11 20:46:45 2015 +0200| [bbecde2e90325d7d2fbdc011b2cf4808caf49edd] | committer: David Fuhrmann

macosx: fix main window appearing with a delay of some seconds

close #14361

(cherry picked from commit 8de7ac281107b742b40867b0694482bf9861effb)
Signed-off-by: David Fuhrmann <dfuhrmann at videolan.org>

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

 modules/gui/macosx/intf.m |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/modules/gui/macosx/intf.m b/modules/gui/macosx/intf.m
index f59c159..05779af 100644
--- a/modules/gui/macosx/intf.m
+++ b/modules/gui/macosx/intf.m
@@ -783,7 +783,10 @@ static VLCMain *_o_sharedMainInstance = nil;
     PL_UNLOCK;
 
     [NSBundle loadNibNamed:@"MainWindow" owner: self];
-    [o_mainwindow makeKeyAndOrderFront:nil];
+
+    // 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];
 }



More information about the vlc-commits mailing list