[vlc-commits] macosx: fixed 'disappearing' main window (fixes #5714)

Felix Paul Kühne git at videolan.org
Fri Dec 23 02:04:13 CET 2011


vlc/vlc-1.2 | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Fri Dec 23 01:15:46 2011 +0100| [2df655dacbc2eab3b19297a8916e6c171add1a46] | committer: Jean-Baptiste Kempf

macosx: fixed 'disappearing' main window (fixes #5714)
(cherry picked from commit 7183021afcd2628a9d66b8fefd82c6e7fd509370)

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-1.2.git/?a=commit;h=2df655dacbc2eab3b19297a8916e6c171add1a46
---

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

diff --git a/modules/gui/macosx/MainWindow.m b/modules/gui/macosx/MainWindow.m
index cbf112f..bd8ce1d 100644
--- a/modules/gui/macosx/MainWindow.m
+++ b/modules/gui/macosx/MainWindow.m
@@ -788,6 +788,9 @@ static VLCMainWindow *_o_sharedInstance = nil;
 
         /* chapters & titles */
         //FIXME! b_chapters = p_input->stream.i_area_nb > 1;
+
+        if (cachedInputState == PLAYING_S || b_buffering == YES)
+            [self makeKeyAndOrderFront: nil];
         vlc_object_release( p_input );
     }
 
diff --git a/modules/gui/macosx/intf.m b/modules/gui/macosx/intf.m
index 91d061e..5cb6b15 100644
--- a/modules/gui/macosx/intf.m
+++ b/modules/gui/macosx/intf.m
@@ -262,7 +262,7 @@ static int InputEvent( vlc_object_t *p_this, const char *psz_var,
             [[VLCMain sharedInstance] updateMainMenu];
             break;
         case INPUT_EVENT_CACHE:
-            [[VLCMain sharedInstance] updateMainWindow];
+            [[VLCMain sharedInstance] performSelectorOnMainThread:@selector(updateMainWindow) withObject: nil waitUntilDone: NO];
             break;
         case INPUT_EVENT_STATISTICS:
             [[[VLCMain sharedInstance] info] performSelectorOnMainThread:@selector(updateStatistics) withObject: nil waitUntilDone: NO];
@@ -1461,6 +1461,8 @@ unsigned int CocoaKeyToVLC( unichar i_key )
         }
         vlc_object_release( p_input );
     }
+
+    [[VLCMain sharedInstance] performSelectorOnMainThread:@selector(updateMainWindow) withObject: nil waitUntilDone: NO];
 }
 
 - (void)playbackModeUpdated



More information about the vlc-commits mailing list