]> git.sesse.net Git - vlc/commitdiff
macosx/vout*: fixed escape key not exiting fullscreen and video-on-top
authorEric Petit <titer@videolan.org>
Sun, 12 Dec 2004 03:24:05 +0000 (03:24 +0000)
committerEric Petit <titer@videolan.org>
Sun, 12 Dec 2004 03:24:05 +0000 (03:24 +0000)
               not working in GL mode

modules/gui/macosx/vout.h
modules/gui/macosx/vout.m
modules/gui/macosx/voutgl.m

index 0a3be4991176f58f27e5d8b7d55efd957177fc87..33432d75d0e94b8314e63cb3abeddc24d6ea439c 100644 (file)
@@ -30,6 +30,7 @@
 @interface VLCWindow : NSWindow
 {
     vout_thread_t * p_vout;
+    vout_thread_t * p_real_vout;
 
     Ptr             p_fullscreen_state;
     mtime_t         i_time_mouse_last_moved;
index 580d2f9f1f523a5e3e6cdab6fac793f95a81984a..1701b2ffa0d7cb15dc7d64c122c208c8eebe13e1 100644 (file)
     [self setReleasedWhenClosed: YES];
 
     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;
     i_time_mouse_last_moved = mdate();
 
 
         [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];
         }
 - (void)toggleFullscreen
 {
     vlc_value_t val;
-    val.b_bool = !p_vout->b_fullscreen;
-    var_Set( p_vout, "fullscreen", val );
+    val.b_bool = !p_real_vout->b_fullscreen;
+    var_Set( p_real_vout, "fullscreen", val );
 }
 
 - (BOOL)isFullscreen
index ce4f2eece6f8d15c4560c1e38b08a783588dce90..c0d2f9fbd19af4553b6f513c73d705ee545d7831 100644 (file)
@@ -78,14 +78,12 @@ int E_(OpenVideoGL)  ( vlc_object_t * p_this )
     int i_timeout;
     vlc_value_t val;
 
-
 /* OpenGL interface disabled until
- * - the video on top var is properly working
- * - the escape key is working in fullscreen
  * - the green line is gone
  * - other problems?????
  */
-return( 1 );
+    return( 1 );
+
     if( !CGDisplayUsesOpenGLAcceleration( kCGDirectMainDisplay ) )
     {
         msg_Warn( p_vout, "no hardware acceleration" );