-
Bug
-
Resolution: Done
-
P2: Important
-
5.0.0 Beta 1
-
None
-
Windows 7 x64
-
dcc2e84fd0cdc90d633d2e5992ab1fc03e2aa861
Hi,
I'm trying to extend my Qt-based application with the new taskbar features which have been introduced in Windows 7 (IID_ITaskbarList3) based on the blog posting at http://nicug.blogspot.nl/2011/01/windows-7-taskbar-extensions-in-qt.html
The blog posting is based on Qt4 (which uses QWindow::winEvent to catch messages sent to the window). To get this working with Qt5 I replaced QWindow::winEvent with QWindow::nativeEvent.
After testing I've found out that the window messages which I'm interested in ("TaskbarButtonCreated") doesn't get delivered to the QWindow::nativeEvent function.
I think the cause for this lies in src/plugins/platforms/windows/qwindowscontext.cpp in the function QWindowsContext::windowsProc. This function contains this snippet of code:
bool QWindowsContext::windowsProc(HWND hwnd, UINT message,
QtWindows::WindowsEventType et,
WPARAM wParam, LPARAM lParam, LRESULT *result)
<snip>
switch (et) {
<snip>
case QtWindows::UnknownEvent:
return false;
<snip>
filterResult = 0;
if (QWindowSystemInterface::handleNativeEvent(platformWindow->window(), d->m_eventType, &msg, &filterResult))
The message I'm interested in isn't known by Qt so therefore the et variable will be set to QtWindows::UnknownEvent. This causes the QWindow::nativeEvent to never get triggered for unknown messages.
Can this behaviour be changed so that unknown messages/events will also get propagated to the QWindow::nativeEvent function ?