Commit 8984dcc1 authored by Benjamin Pracht's avatar Benjamin Pracht

backports of 15287 and 15222

parent c27be2b8
......@@ -358,6 +358,7 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable,
{
vlc_value_t val;
if( !p_real_vout ) return;
if( var_Get( p_real_vout, "video-on-top", &val )>=0 && val.b_bool)
{
val.b_bool = VLC_FALSE;
......@@ -372,6 +373,7 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable,
- (void)toggleFullscreen
{
vlc_value_t val;
if( !p_real_vout ) return;
var_Get( p_real_vout, "fullscreen", &val );
val.b_bool = !val.b_bool;
var_Set( p_real_vout, "fullscreen", val );
......@@ -425,7 +427,7 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable,
/* Escape should always get you out of fullscreen */
if( key == (unichar) 0x1b )
{
if( [self isFullscreen] )
if( p_real_vout && [self isFullscreen] )
{
[self toggleFullscreen];
}
......@@ -770,6 +772,13 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable,
frame: s_arg_frame];
[self updateTitle];
[view setFrame: [self frame]];
if( var_GetBool( p_real_vout, "video-on-top" ) )
{
[o_window setLevel: NSStatusWindowLevel];
}
[o_window setAcceptsMouseMovedEvents: TRUE];
return b_return;
}
......@@ -851,6 +860,12 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable,
o_window = [self window];
[o_window makeKeyAndOrderFront: self];
[o_window setAcceptsMouseMovedEvents: TRUE];
if( var_GetBool( p_real_vout, "video-on-top" ) )
{
[o_window setLevel: NSStatusWindowLevel];
}
[view setFrameSize: [self frame].size];
}
return b_return;
......@@ -1055,11 +1070,6 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable,
[self setAlphaValue: var_GetFloat( p_vout, "macosx-opaqueness" )];
if( var_GetBool( p_real_vout, "video-on-top" ) )
{
[self setLevel: NSStatusWindowLevel];
}
if( !s_frame )
{
[self center];
......
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