Mouse Click/Double Click Issue

This forum is about all development around libVLC.
WippelDa
Blank Cone
Blank Cone
Posts: 11
Joined: 21 Dec 2009 10:53

Mouse Click/Double Click Issue

Postby WippelDa » 02 Jun 2010 11:03

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

DsChAeK
Blank Cone
Blank Cone
Posts: 59
Joined: 01 Mar 2008 14:54
VLC version: newest
Operating System: windows

Re: Mouse Click/Double Click Issue

Postby DsChAeK » 02 Jun 2010 13:36

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

Rémi Denis-Courmont
Developer
Developer
Posts: 15266
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: Mouse Click/Double Click Issue

Postby Rémi Denis-Courmont » 02 Jun 2010 19:31

That's why libvlc_video_set_mouse_input() exists.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

DsChAeK
Blank Cone
Blank Cone
Posts: 59
Joined: 01 Mar 2008 14:54
VLC version: newest
Operating System: windows

Re: Mouse Click/Double Click Issue

Postby DsChAeK » 03 Jun 2010 14:57

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.

Rémi Denis-Courmont
Developer
Developer
Posts: 15266
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: Mouse Click/Double Click Issue

Postby Rémi Denis-Courmont » 03 Jun 2010 20:23

The documentation is out-of-date. It's implemented on both X11 and Win32.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

erwan10
Developer
Developer
Posts: 415
Joined: 02 Nov 2008 23:16

Re: Mouse Click/Double Click Issue

Postby erwan10 » 03 Jun 2010 22:14

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

DsChAeK
Blank Cone
Blank Cone
Posts: 59
Joined: 01 Mar 2008 14:54
VLC version: newest
Operating System: windows

Re: Mouse Click/Double Click Issue

Postby DsChAeK » 04 Jun 2010 14:50

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


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 17 guests