[vlc-devel] [PATCH]Add wineventfilter to QT4 (Win32)

Kaarlo Räihä agent_007 at luukku.com
Mon Oct 6 17:51:42 CEST 2008


Jean-Baptiste Kempf kirjoitti 05.10.2008 kello 23:43:
> On Sun, Oct 05, 2008 at 10:08:04PM +0300, Kaarlo Räihä wrote :
> > Jean-Baptiste Kempf kirjoitti 05.10.2008 kello 18:05:
> > > On Sun, Oct 05, 2008 at 05:46:23PM +0300, Kaarlo Räihä wrote :
> > > > As reported in http://forum.videolan.org/viewtopic.php?f=14&t=50179
> and
> > > in http://trac.videolan.org/vlc/ticket/2086 QT4 GUI doesn't handle
> > > WM_APPCOMMAND messages correctly and that is why mute, volume etc.
> > > mediakeys on keyboards don't work. This patch should fix it. I am
> > >  not sure
> > > if this is QT4 feature or bug but I will contact QT4 support about this
> > > issue (it affects all QT4 software).
> > > > 
> > > > Also it is pre work for better WM_APPCOMMAND message support
> requested in
> > > http://forum.videolan.org/viewtopic.php?f=7&t=49670 there which I
> > >  will add
> > > next week to QT4 and skins2 interface.
> > > > 
> > > > All these changes should only affect Win32 builds. 
> > > > 
> > > > (it seems that git patches change also file permissions, there isn't
> need
> > > for that, but I am not git guru, so I don't know how to avoid that) 
> > > 
> > > Excuse-me, but why using QWidget::winEvent wouldn't work ?
> > If http://doc.trolltech.com/4.3/qwidget.html#winEvent and
> http://doc.trolltech.com/4.3/qcoreapplication.html#winEventFilter are
> correct, I assume both should work. I did winEventFilter because I found
> more helpful sample code related to winEventFilter. I am not a QT
> specialist so I don't know the difference between those two.
> 
> Ok. Fully understood.
> The QApplication is more global that the QWidget one. After thinking a
> bit, you are right, the Application one is better, because it can solve
> corner cases (should work for all dialogs... in this way).
> 
> However, I don't like this solution because you subclass the
> QApplication for Win32 and not for x11... I would have prefer creating a
> QVLCApplication and override only on win32 the winEventFilter...

I was thinking of this, but there were two reasons why I didn't do that: 
1. I can't do Mac OS X nor Linux builds so I couldn't make sure compile and running would work (I don't want to do blind patches to system if I cannot do any testing on them).
2. There are also x11EventFilter and macEventFilter if someone wants to override events on x11 or or Mac systems. I don't know if anyone wants or needs those but code would IMHO look much better with those if this would be called QVLCApplication (at least commented out versions of those EventFilters). And because I know nothing about x11 nor mac events, I didn't add those.

If you or someone else wants to make it better, go ahead. I just want less (complain) threads to Windows forum about this issue =)   
> 
> -- 
> jb
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> http://mailman.videolan.org/listinfo/vlc-devel


...................................................................
Luukku Plus paketilla pääset eroon tila- ja turvallisuusongelmista.
Hanki Luukku Plus ja helpotat elämääsi. http://www.mtv3.fi/luukku




More information about the vlc-devel mailing list