Commit a272d13a authored by Eric Petit's avatar Eric Petit

macosx/vout*: fixed escape key not exiting fullscreen and video-on-top

               not working in GL mode
parent 2feaca93
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
@interface VLCWindow : NSWindow @interface VLCWindow : NSWindow
{ {
vout_thread_t * p_vout; vout_thread_t * p_vout;
vout_thread_t * p_real_vout;
Ptr p_fullscreen_state; Ptr p_fullscreen_state;
mtime_t i_time_mouse_last_moved; mtime_t i_time_mouse_last_moved;
......
...@@ -50,6 +50,19 @@ ...@@ -50,6 +50,19 @@
[self setReleasedWhenClosed: YES]; [self setReleasedWhenClosed: YES];
p_vout = _p_vout; p_vout = _p_vout;
/* p_real_vout: the vout we have to use to check for video-on-top
and a few other things. If we are the QuickTime output, it's us.
It we are the OpenGL provider, it is our parent. */
if( p_vout->i_object_type == VLC_OBJECT_OPENGL )
{
p_real_vout = (vout_thread_t *) p_vout->p_parent;
}
else
{
p_real_vout = p_vout;
}
p_fullscreen_state = NULL; p_fullscreen_state = NULL;
i_time_mouse_last_moved = mdate(); i_time_mouse_last_moved = mdate();
...@@ -126,7 +139,7 @@ ...@@ -126,7 +139,7 @@
[self setAlphaValue: var_GetFloat( p_vout, "macosx-opaqueness" )]; [self setAlphaValue: var_GetFloat( p_vout, "macosx-opaqueness" )];
if( var_GetBool( p_vout, "video-on-top" ) ) if( var_GetBool( p_real_vout, "video-on-top" ) )
{ {
[self setLevel: NSStatusWindowLevel]; [self setLevel: NSStatusWindowLevel];
} }
...@@ -261,8 +274,8 @@ ...@@ -261,8 +274,8 @@
- (void)toggleFullscreen - (void)toggleFullscreen
{ {
vlc_value_t val; vlc_value_t val;
val.b_bool = !p_vout->b_fullscreen; val.b_bool = !p_real_vout->b_fullscreen;
var_Set( p_vout, "fullscreen", val ); var_Set( p_real_vout, "fullscreen", val );
} }
- (BOOL)isFullscreen - (BOOL)isFullscreen
......
...@@ -78,14 +78,12 @@ int E_(OpenVideoGL) ( vlc_object_t * p_this ) ...@@ -78,14 +78,12 @@ int E_(OpenVideoGL) ( vlc_object_t * p_this )
int i_timeout; int i_timeout;
vlc_value_t val; vlc_value_t val;
/* OpenGL interface disabled until /* OpenGL interface disabled until
* - the video on top var is properly working
* - the escape key is working in fullscreen
* - the green line is gone * - the green line is gone
* - other problems????? * - other problems?????
*/ */
return( 1 ); return( 1 );
if( !CGDisplayUsesOpenGLAcceleration( kCGDirectMainDisplay ) ) if( !CGDisplayUsesOpenGLAcceleration( kCGDirectMainDisplay ) )
{ {
msg_Warn( p_vout, "no hardware acceleration" ); msg_Warn( p_vout, "no hardware acceleration" );
......
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