]> git.sesse.net Git - vlc/blobdiff - modules/video_filter/wrapper.c
Do not propagate fullscreen status up the filter chain
[vlc] / modules / video_filter / wrapper.c
index 9271c9723788b59b18ac327a027349447ce8ef32..dbb837db16cdab7f38917bd49786c8f154d56b1b 100644 (file)
@@ -117,8 +117,6 @@ static int  FilterAllocationInit ( filter_t *, void * );
 static void FilterAllocationClean( filter_t * );
 
 /* */
-static int  FullscreenEventUp( vlc_object_t *, char const *,
-                               vlc_value_t, vlc_value_t, void * );
 static int  FullscreenEventDown( vlc_object_t *, char const *,
                                  vlc_value_t, vlc_value_t, void * );
 static int  SplitterPictureNew( video_splitter_t *, picture_t *pp_picture[] );
@@ -310,11 +308,11 @@ static int Init( vout_thread_t *p_vout )
             }
         }
 
-        /* Attach once pp_vout is completly field to avoid race conditions */
+        /* Attach once pp_vout is completly filed to avoid race conditions */
         for( int i = 0; i < p_splitter->i_output; i++ )
             vout_filter_SetupChild( p_vout, p_sys->pp_vout[i],
                                     MouseEvent,
-                                    FullscreenEventUp, FullscreenEventDown, true );
+                                    FullscreenEventDown, true );
         /* Restore settings */
         var_SetInteger( p_vout, "align", i_org_align );
         var_SetInteger( p_vout, "video-x", i_org_x );
@@ -398,7 +396,7 @@ static void VoutsClean( vout_thread_t *p_vout, int i_count )
         else
              vout_filter_SetupChild( p_vout, p_sys->pp_vout[i],
                                      MouseEvent,
-                                     FullscreenEventUp, FullscreenEventDown, false );
+                                     FullscreenEventDown, false );
     }
 
     for( int i = 0; i < i_count; i++ )
@@ -555,17 +553,6 @@ static bool IsFullscreenActive( vout_thread_t *p_vout )
     }
     return false;
 }
-static int FullscreenEventUp( vlc_object_t *p_this, char const *psz_var,
-                              vlc_value_t oldval, vlc_value_t newval, void *p_data )
-{
-    vout_thread_t *p_vout = p_data;
-    VLC_UNUSED(oldval); VLC_UNUSED(p_this); VLC_UNUSED(psz_var); VLC_UNUSED(newval);
-
-    const bool b_fullscreen = IsFullscreenActive( p_vout );
-    if( !var_GetBool( p_vout, "fullscreen" ) != !b_fullscreen )
-        return var_SetBool( p_vout, "fullscreen", b_fullscreen );
-    return VLC_SUCCESS;
-}
 static int FullscreenEventDown( vlc_object_t *p_this, char const *psz_var,
                                 vlc_value_t oldval, vlc_value_t newval, void *p_data )
 {
@@ -573,19 +560,10 @@ static int FullscreenEventDown( vlc_object_t *p_this, char const *psz_var,
     vout_sys_t *p_sys = p_vout->p_sys;
     VLC_UNUSED(oldval); VLC_UNUSED(p_data); VLC_UNUSED(psz_var);
 
-    const bool b_fullscreen = IsFullscreenActive( p_vout );
-    if( !b_fullscreen != !newval.b_bool )
+    for( int i = 0; i < p_sys->i_vout; i++ )
     {
-        for( int i = 0; i < p_sys->i_vout; i++ )
-        {
-            vout_thread_t *p_child = p_sys->pp_vout[i];
-            if( !var_GetBool( p_child, "fullscreen" ) != !newval.b_bool )
-            {
-                var_SetBool( p_child, "fullscreen", newval.b_bool );
-                if( newval.b_bool )
-                    return VLC_SUCCESS;
-            }
-        }
+        vout_thread_t *p_child = p_sys->pp_vout[i];
+        var_SetBool( p_child, "fullscreen", newval.b_bool );
     }
     return VLC_SUCCESS;
 }