[vlc-commits] macosx: make sure we update the menu from the main thread only (fixes #5737 )

Felix Paul Kühne git at videolan.org
Fri Jan 6 19:39:41 CET 2012


vlc | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Fri Jan  6 19:39:36 2012 +0100| [8e3953e5508260bba516c09836fe44a180d0ef22] | committer: Felix Paul Kühne

macosx: make sure we update the menu from the main thread only (fixes #5737)

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

 modules/gui/macosx/intf.m |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/modules/gui/macosx/intf.m b/modules/gui/macosx/intf.m
index f4c686d..0256e1c 100644
--- a/modules/gui/macosx/intf.m
+++ b/modules/gui/macosx/intf.m
@@ -259,7 +259,7 @@ static int InputEvent( vlc_object_t *p_this, const char *psz_var,
             break;
         case INPUT_EVENT_TITLE:
         case INPUT_EVENT_CHAPTER:
-            [[VLCMain sharedInstance] updateMainMenu];
+            [[VLCMain sharedInstance] performSelectorOnMainThread:@selector(updateMainMenu) withObject: nil waitUntilDone:NO];
             break;
         case INPUT_EVENT_CACHE:
             [[VLCMain sharedInstance] performSelectorOnMainThread:@selector(updateMainWindow) withObject: nil waitUntilDone: NO];
@@ -277,7 +277,7 @@ static int InputEvent( vlc_object_t *p_this, const char *psz_var,
             break;
         case INPUT_EVENT_ITEM_META:
         case INPUT_EVENT_ITEM_INFO:
-            [[VLCMain sharedInstance] updateMainMenu];
+            [[VLCMain sharedInstance] performSelectorOnMainThread:@selector(updateMainMenu) withObject: nil waitUntilDone:NO];
             [[VLCMain sharedInstance] updateName];
             [[VLCMain sharedInstance] updateInfoandMetaPanel];
             break;
@@ -287,7 +287,7 @@ static int InputEvent( vlc_object_t *p_this, const char *psz_var,
             [[VLCMain sharedInstance] updateRecordState: var_GetBool( p_this, "record" )];
             break;
         case INPUT_EVENT_PROGRAM:
-            [[VLCMain sharedInstance] updateMainMenu];
+            [[VLCMain sharedInstance] performSelectorOnMainThread:@selector(updateMainMenu) withObject: nil waitUntilDone:NO];
             break;
         case INPUT_EVENT_ITEM_EPG:
             break;



More information about the vlc-commits mailing list