Commit 2975e916 authored by David Fuhrmann's avatar 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
parent 3525d588
......@@ -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];
}
......
......@@ -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)
......
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