diff options
author | Friedemann Kleint <Friedemann.Kleint@digia.com> | 2013-01-30 10:05:55 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-01-30 21:50:00 +0100 |
commit | 38f740e4de9a313fd33984bd54834c56dc2316c4 (patch) | |
tree | 11643b1aaa2f3dcdf56579760d7d15718f767424 /src/plugins/platforms | |
parent | 2be4d6ba022e1349b1b231ae852235f557c6fc20 (diff) |
Windows tray icon: Fix reinstalling after restart of Explorer.
Use a normal instead of a HWND_MESSAGE-window since the latter
do not receive the "TaskbarCreated" message. Provide an invokable
slot in the native interface to register a window class for that
purpose.
Task-number: QTBUG-29160
Change-Id: Ic25222d08d21867f7d882a9e19d8aaf50f3f47cf
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Diffstat (limited to 'src/plugins/platforms')
-rw-r--r-- | src/plugins/platforms/windows/qwindowsintegration.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/plugins/platforms/windows/qwindowsintegration.cpp b/src/plugins/platforms/windows/qwindowsintegration.cpp index aac28c36dc..4473b6b8a4 100644 --- a/src/plugins/platforms/windows/qwindowsintegration.cpp +++ b/src/plugins/platforms/windows/qwindowsintegration.cpp @@ -107,6 +107,9 @@ public: Q_INVOKABLE void *createMessageWindow(const QString &classNameTemplate, const QString &windowName, void *eventProc) const; + + Q_INVOKABLE QString registerWindowClass(const QString &classNameIn, void *eventProc) const; + bool asyncExpose() const; void setAsyncExpose(bool value); }; @@ -186,6 +189,15 @@ void *QWindowsNativeInterface::createMessageWindow(const QString &classNameTempl return hwnd; } +/*! + \brief Registers a unique window class with a callback function based on \a classNameIn. +*/ + +QString QWindowsNativeInterface::registerWindowClass(const QString &classNameIn, void *eventProc) const +{ + return QWindowsContext::instance()->registerWindowClass(classNameIn, (WNDPROC)eventProc); +} + bool QWindowsNativeInterface::asyncExpose() const { return QWindowsContext::instance()->asyncExpose(); |