Commit dce6109d authored by Felix Paul Kühne's avatar Felix Paul Kühne

macosx: retain window level across a fullscreen session

parent e24e9a5f
...@@ -945,7 +945,8 @@ static VLCMainWindow *_o_sharedInstance = nil; ...@@ -945,7 +945,8 @@ static VLCMainWindow *_o_sharedInstance = nil;
[o_fullscreen_window makeKeyAndOrderFront:self]; [o_fullscreen_window makeKeyAndOrderFront:self];
[o_fullscreen_window orderFront:self animate:YES]; [o_fullscreen_window orderFront:self animate:YES];
[o_fullscreen_window setFrame:screen_rect display:YES]; [o_fullscreen_window setFrame:screen_rect display:YES animate:YES];
[o_fullscreen_window setLevel:NSNormalWindowLevel];
if( blackout_other_displays ) if( blackout_other_displays )
{ {
...@@ -1034,6 +1035,7 @@ static VLCMainWindow *_o_sharedInstance = nil; ...@@ -1034,6 +1035,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
/* tell the fspanel to move itself to front next time it's triggered */ /* tell the fspanel to move itself to front next time it's triggered */
[o_fspanel setVoutWasUpdated: (int)[[o_fullscreen_window screen] displayID]]; [o_fspanel setVoutWasUpdated: (int)[[o_fullscreen_window screen] displayID]];
[o_fspanel setActive: nil];
if([self isVisible]) if([self isVisible])
[super orderOut: self]; [super orderOut: self];
...@@ -1062,6 +1064,16 @@ static VLCMainWindow *_o_sharedInstance = nil; ...@@ -1062,6 +1064,16 @@ static VLCMainWindow *_o_sharedInstance = nil;
/* We always try to do so */ /* We always try to do so */
[NSScreen unblackoutScreens]; [NSScreen unblackoutScreens];
vout_thread_t *p_vout = getVout();
if (p_vout)
{
if( var_GetBool( p_vout, "video-on-top" ) )
[self setLevel: NSStatusWindowLevel];
else
[self setLevel: NSNormalWindowLevel];
vlc_object_release( p_vout );
}
[self makeKeyAndOrderFront: nil];
/* Don't do anything if o_fullscreen_window is already closed */ /* Don't do anything if o_fullscreen_window is already closed */
if (!o_fullscreen_window) if (!o_fullscreen_window)
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
*****************************************************************************/ *****************************************************************************/
#import "intf.h" #import "intf.h"
#import "CoreInteraction.h" #import "CoreInteraction.h"
#import "vout.h" #import "MainWindow.h"
#import "misc.h" #import "misc.h"
#import "fspanel.h" #import "fspanel.h"
...@@ -253,7 +253,7 @@ ...@@ -253,7 +253,7 @@
if (p_vout) if (p_vout)
{ {
if (var_GetBool( p_vout, "fullscreen" )) if (var_GetBool( p_vout, "fullscreen" ))
[[[[VLCCoreInteraction sharedInstance] voutView] window] makeKeyWindow]; [[[[VLCMainWindow sharedInstance] videoView] window] makeKeyWindow];
vlc_object_release( p_vout ); vlc_object_release( p_vout );
} }
} }
......
...@@ -152,19 +152,9 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable, ...@@ -152,19 +152,9 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable,
[o_view setFrameSize: [self frame].size]; [o_view setFrameSize: [self frame].size];
} }
- (void)drawRect:(NSRect)rect
{
/* When there is no subview we draw a black background */
[self lockFocus];
[[NSColor blackColor] set];
NSRectFill(rect);
[self unlockFocus];
}
- (void)closeVout - (void)closeVout
{ {
/* Make sure we don't see a white flash */ /* Make sure we don't see a white flash */
[[o_view window] disableScreenUpdatesUntilFlush];
[o_view removeFromSuperview]; [o_view removeFromSuperview];
[o_view release]; [o_view release];
o_view = nil; o_view = nil;
......
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