]> git.sesse.net Git - vlc/commitdiff
logo: inform listeners when picture has been moved
authorJean-Paul Saman <jean-paul.saman@m2x.nl>
Fri, 5 Feb 2010 13:14:25 +0000 (14:14 +0100)
committerJean-Paul Saman <jean-paul.saman@m2x.nl>
Thu, 11 Feb 2010 10:03:39 +0000 (11:03 +0100)
modules/video_filter/logo.c

index 6eba7a8c73092e6f0f504c4eab97dc213c634c48..37f8eeedd2b4bd4a578593a9d1df67195046d14e 100644 (file)
@@ -231,7 +231,6 @@ static int OpenCommon( vlc_object_t *p_this, bool b_sub )
         return VLC_EGENERIC;
     }
 
-
     /* */
     p_filter->p_sys = p_sys = malloc( sizeof( *p_sys ) );
     if( !p_sys )
@@ -534,6 +533,14 @@ static int Mouse( filter_t *p_filter, vlc_mouse_t *p_mouse,
                                     p_filter->fmt_in.video.i_width  - i_logo_w );
             p_sys->i_pos_y = __MIN( __MAX( p_sys->i_pos_y + i_dy, 0 ),
                                     p_filter->fmt_in.video.i_height - i_logo_h );
+
+            /* object under mouse has moved */
+            var_SetBool( p_filter->p_parent, "mouse-object", true );
+        }
+        else if( b_over )
+        {
+            /* object under mouse stoped moving */
+            var_SetBool( p_filter->p_parent, "mouse-object", false );
         }
 
         if( p_sys->b_mouse_grab || b_over )