[vlc-devel] Getting onmousemove messages from the VLC plugin

Ben Dean-Kawamura ben.dean.kawamura at gmail.com
Fri Jun 16 20:07:58 CEST 2006


Hi all, I'm developing a program that uses the VLC mozilla plugin to
play videos, however I've run into a bit of a snag.  I'd like to
receive mouse move events in the browser window when the mouse is over
the VLC plugin, however it doesn't work with the stock vlc 0.8.5.

The simplest way that I can think of is propagate the events to the
parent window that mozilla controls.  I made a naive hack that seems
to work, but probably has unintended side effects.  Can anyone see
problems with the below patch?  Is there a better way to do things?

The program in question is Democracy Player (www.getdemocracy.com).

Thanks in advance,
Ben

--- vlc-0.8.5/modules/video_output/directx/events.c     2006-06-16
13:56:33.000000000 -0400
+++ ../vlc-0.8.5/modules/video_output/directx/events.c  2006-05-06
11:52:17.000000000 -0400
@@ -88,7 +88,6 @@
     vlc_value_t val;
     int i_width, i_height, i_x, i_y;
     HMODULE hkernel32;
-    HWND parent;

     /* Initialisation */
     p_event->p_vout->pf_control = Control;
@@ -157,11 +156,6 @@
                 val.b_bool = VLC_TRUE;
                 var_Set( p_event->p_vout, "mouse-moved", val );
             }
-            parent = GetParent(msg.hwnd);
-            if(parent != NULL) {
-                PostMessage(parent, msg.message, msg.lParam, msg.wParam);
-            }
-            break;

         case WM_NCMOUSEMOVE:
             GetCursorPos( &mouse_pos );

-- 
This is the vlc-devel mailing-list, see http://www.videolan.org/vlc/
To unsubscribe, please read http://developers.videolan.org/lists.html



More information about the vlc-devel mailing list