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

Sebastien Zwickert dilaroga at gmail.com
Fri Jul 30 12:25:54 CEST 2010


On Jul 30, 2010, at 10:20 AM, Pierre d'Herbemont wrote:
> 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:
>>> 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.

Comment added.

> Also:
> 
> +        vout_display_sys_t *sys = vd->sys;
> +        if (sys->container && [sys->container
> respondsToSelector:@selector(mouseMoved:)])
> +            [sys->container mouseMoved:theEvent];
> 
> I would just pass it to super. Less code, and probably more accurate.
> What do you think?

Fixed.
You're right : i've forgot that the default implementation simply passes this message
to the next responder so with super we don't break the responders chain. 
Moreover by default the next responder is the superview, so same result 
for less code and more accurate.

> 
> And
> 
> +- (BOOL)acceptsFirstResponder
> +{
> +    return YES;
> +}
> 
> Needs to return NO when "mouse-events" is false.

In this case, all the events won't be sent to the view. Maybe later we need to manage
the keyboard events. Thus libvlc application should be able to enable/disable mouse-events
and keyboard-events independently.
What do you think ?


New patch in attachment.

--
Sebastien Zwickert

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-MacOS-manage-the-mouse-events-to-allow-DVD-navigati.patch
Type: application/octet-stream
Size: 2893 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20100730/713a5322/attachment.obj>
-------------- next part --------------



More information about the vlc-devel mailing list