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

Sebastien Zwickert dilaroga at gmail.com
Thu Jul 29 23:15:39 CEST 2010


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.

> 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.

> Might be wrong though, but you surely could do some factorization or
> use vout_display_PlacePicture in mouseMoved:.

Thanks to point out to me this useful function :)

> And there are some minor style issues such as:
>> +- (BOOL) acceptsFirstResponder
> no space before accepts

Fixed.

>> +    if ( !vd || ![self mouse:curPoint inRect:[self bounds]] )
> no space after ( and before ).
> ...

Should be fixed.


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: 3193 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20100729/0af80e86/attachment.obj>
-------------- next part --------------





More information about the vlc-devel mailing list