[vlc-commits] macosx: fixed 'disappearing' main window (fixes #5714)
Felix Paul Kühne
git at videolan.org
Fri Dec 23 01:15:54 CET 2011
vlc | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Fri Dec 23 01:15:46 2011 +0100| [7183021afcd2628a9d66b8fefd82c6e7fd509370] | committer: Felix Paul Kühne
macosx: fixed 'disappearing' main window (fixes #5714)
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=7183021afcd2628a9d66b8fefd82c6e7fd509370
---
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 cbffe17..a9b0ce6 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