[vlc-devel] [PATCH] MacOS: manage the mouse events to allow DVD navigation.

Pierre d'Herbemont pdherbemont at free.fr
Fri Jul 30 10:20:36 CEST 2010

Hi Sebastien,

Thanks for the fast update.

On Thu, Jul 29, 2010 at 11:15 PM, Sebastien Zwickert <dilaroga at gmail.com> wrote:
> On Jul 29, 2010, at 2:09 PM, Pierre d'Herbemont wrote:
>> What if the libvlc application wants to handle mouse events itself,
>> and is not interested in DVD functionality? The patch is not
>> forwarding event at all, so there is no way to disable it easily. I
>> know that we are suffering from the fact that libvlccore and its
>> plugins do not say if the mouse events will be handled or not. Still,
>> we need to at least keep an option at the very least.
> I've made changes to the patch to forward the mouse events to the
> vout view container if it is able to manage mouse events itself.
> I used the existing option mouse-events as suggested by j-b.
> The public method libvlc_video_set_mouse_input allows libvlc application
> to easily change the value of this option.

This is exactly what needs to be done. Thanks!

>> From what I remember the mouseMoved thing won't work if you don't
>> first set acceptsMouseMoved events.

> Right. The window have to accept the mouse moved events to distribute them
> to its responders.

ok. We need to remind this somewhere. A comment is fine.


+        vout_display_sys_t *sys = vd->sys;
+        if (sys->container && [sys->container
+            [sys->container mouseMoved:theEvent];

I would just pass it to super. Less code, and probably more accurate.
What do you think?


+- (BOOL)acceptsFirstResponder
+    return YES;

Needs to return NO when "mouse-events" is false.

That said, these are minor issues and could be fixed later on.


More information about the vlc-devel mailing list