[vlc-commits] macosx: activate app when going to fullscreen
David Fuhrmann
git at videolan.org
Wed Jul 11 21:52:50 CEST 2012
vlc/vlc-2.0 | branch: master | David Fuhrmann <david.fuhrmann at googlemail.com> | Wed Jul 11 20:08:01 2012 +0200| [bb6f0178e055f197e42f08603dd742d1a997f9d5] | committer: Felix Paul Kühne
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
(cherry picked from commit 2975e9168d3bc1844dd92aaadb0391390c7920ab)
Signed-off-by: Felix Paul Kühne <fkuehne at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.0.git/?a=commit;h=bb6f0178e055f197e42f08603dd742d1a997f9d5
---
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 91c9dc2..6e7e36f 100644
--- a/modules/gui/macosx/MainWindow.m
+++ b/modules/gui/macosx/MainWindow.m
@@ -2194,6 +2194,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 a06c93e..cfadf2d 100644
--- a/modules/gui/macosx/intf.m
+++ b/modules/gui/macosx/intf.m
@@ -1451,6 +1451,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