From 38f740e4de9a313fd33984bd54834c56dc2316c4 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Wed, 30 Jan 2013 10:05:55 +0100 Subject: 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 --- src/plugins/platforms/windows/qwindowsintegration.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/plugins/platforms') 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(); -- cgit v1.2.3