Page 1 of 1

Mouse Click/Double Click Issue

Posted: 02 Jun 2010 11:03
by WippelDa
Hello,

I'm using VLC 1.1 RC to display a video in a QWidget (Qt 4.5.2.) on Win32.

It seems that VLC swallows all mouse clicks on the widget set with libvlc_media_player_set_hwnd. No MousePressed, MouseDoubleClick, MouseReleased event is fired on the underlaying widget...

Is this working as intended and if so, how can i work around this? I saw in the git-history that there where some vlc-events for this but they got removed...

Any suggestions?
david

Re: Mouse Click/Double Click Issue

Posted: 02 Jun 2010 13:36
by DsChAeK
Hello,

I discovered the same Problem with a simple Test Application on Win32.
Doubleclick on video surface has no effect anymore.
Hope we don't need to handle this now by ourselfs...it was really helpfully! :)

DsChAeK

Re: Mouse Click/Double Click Issue

Posted: 02 Jun 2010 19:31
by Rémi Denis-Courmont
That's why libvlc_video_set_mouse_input() exists.

Re: Mouse Click/Double Click Issue

Posted: 03 Jun 2010 14:57
by DsChAeK
This function is not implemented for win32. (.h->* \warning This function is only implemented for X11 at the moment.)
It concerns also the fullscreen functions for embedded video mode.

Re: Mouse Click/Double Click Issue

Posted: 03 Jun 2010 20:23
by Rémi Denis-Courmont
The documentation is out-of-date. It's implemented on both X11 and Win32.

Re: Mouse Click/Double Click Issue

Posted: 03 Jun 2010 22:14
by erwan10
I'm using VLC 1.1 RC to display a video in a QWidget (Qt 4.5.2.) on Win32.

It seems that VLC swallows all mouse clicks on the widget set with libvlc_media_player_set_hwnd. No MousePressed, MouseDoubleClick, MouseReleased event is fired on the underlaying widget...
david
Yes, vlc spawns child windows attached to the window you pass with libvlc_media_player_set_hwnd. And Win32 only delivers mouse events to the visible windows, that happen to be the vlc subwindows.

But, you can do the following to regain control of those mouse events :

- tell vlc to not process them at all (with libvlc_video_set_mouse_input set to false)
- "spy" on vlc subwindows for mouse events via the global hooks available in the Win32 api. (see http://msdn.microsoft.com/en-us/library ... 85%29.aspx)

A recent thread addressed this very issue in Java (viewtopic.php?f=32&t=75768&p=249092) with some success.

Maybe QT4 has also got some wrapper to MS global hooks .... (to be checked)


I discovered the same Problem with a simple Test Application on Win32.
Doubleclick on video surface has no effect anymore.
Hope we don't need to handle this now by ourselfs...it was really helpfully! :)
DsChAeK
This is a quite different issue. Fullscreen was changed quite a bit in vlc1.1, and I fear that there might be some side effect for libvlc on Win32 with the new vout window provider api ... (need more investigation). If so, that would be a bug :(


Erwan10

Re: Mouse Click/Double Click Issue

Posted: 04 Jun 2010 14:50
by DsChAeK
ok, I also tested to set libvlc_video_set_mouse_input() to false and then, if the mouse cursor hides in normal embedded mode, it stays hidden in the whole
application. I also don't like the auto-cursor-hide in embedded mode (also in vlc itself), hope there will be (is?) an option to control this.


DsChAeK