[vlc-devel] [PATCH]Add wineventfilter to QT4 (Win32)
jb at videolan.org
Sun Oct 5 22:43:24 CEST 2008
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...
More information about the vlc-devel