[vlc-commits] macosx: activate app when going to fullscreen
David Fuhrmann
git at videolan.org
Wed Jul 11 20:10:13 CEST 2012
vlc | branch: master | David Fuhrmann <david.fuhrmann at googlemail.com> | Wed Jul 11 20:08:01 2012 +0200| [2975e9168d3bc1844dd92aaadb0391390c7920ab] | committer: David Fuhrmann
macosx: activate app when going to fullscreen
this fixes a really nasty window layout mixing foreign windows with
the fs controller and the video, when activating while window is inactive
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=2975e9168d3bc1844dd92aaadb0391390c7920ab
---
modules/gui/macosx/MainWindow.m | 4 ++++
modules/gui/macosx/intf.m | 2 ++
2 files changed, 6 insertions(+)
diff --git a/modules/gui/macosx/MainWindow.m b/modules/gui/macosx/MainWindow.m
index f0b5661..db5399c 100644
--- a/modules/gui/macosx/MainWindow.m
+++ b/modules/gui/macosx/MainWindow.m
@@ -2398,6 +2398,10 @@ static VLCMainWindow *_o_sharedInstance = nil;
- (void)windowDidEnterFullScreen:(NSNotification *)notification
{
+ // Indeed, we somehow can have an "inactive" fullscreen (but a visible window!).
+ // But this creates some problems when leaving fs over remote intfs, so activate app here.
+ [NSApp activateIgnoringOtherApps:YES];
+
[o_fspanel setVoutWasUpdated: (int)[[self screen] displayID]];
[o_fspanel setActive: nil];
}
diff --git a/modules/gui/macosx/intf.m b/modules/gui/macosx/intf.m
index ee59fc7..69a883b 100644
--- a/modules/gui/macosx/intf.m
+++ b/modules/gui/macosx/intf.m
@@ -1461,6 +1461,8 @@ unsigned int CocoaKeyToVLC( unichar i_key )
input_thread_t * p_input = pl_CurrentInput( VLCIntf );
if( p_input != NULL && [self activeVideoPlayback] )
{
+ // activate app, as method can also be triggered from outside the app (prevents nasty window layout)
+ [NSApp activateIgnoringOtherApps:YES];
[o_mainwindow performSelectorOnMainThread:@selector(enterFullscreen) withObject:nil waitUntilDone:NO];
}
if (p_input)
More information about the vlc-commits
mailing list