Commit bb6f0178 authored by David Fuhrmann's avatar David Fuhrmann Committed by 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: default avatarFelix Paul Kühne <fkuehne@videolan.org>
parent dcf3c913
...@@ -2194,6 +2194,10 @@ static VLCMainWindow *_o_sharedInstance = nil; ...@@ -2194,6 +2194,10 @@ static VLCMainWindow *_o_sharedInstance = nil;
- (void)windowDidEnterFullScreen:(NSNotification *)notification - (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 setVoutWasUpdated: (int)[[self screen] displayID]];
[o_fspanel setActive: nil]; [o_fspanel setActive: nil];
} }
......
...@@ -1451,6 +1451,8 @@ unsigned int CocoaKeyToVLC( unichar i_key ) ...@@ -1451,6 +1451,8 @@ unsigned int CocoaKeyToVLC( unichar i_key )
input_thread_t * p_input = pl_CurrentInput( VLCIntf ); input_thread_t * p_input = pl_CurrentInput( VLCIntf );
if( p_input != NULL && [self activeVideoPlayback] ) 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]; [o_mainwindow performSelectorOnMainThread:@selector(enterFullscreen) withObject:nil waitUntilDone:NO];
} }
if (p_input) if (p_input)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment