From 77e0e7c414b7547a36734cfea3e5b237329c93ab Mon Sep 17 00:00:00 2001 From: Wladimir Leuschner Date: Tue, 17 Oct 2023 14:25:25 +0200 Subject: [PATCH] Fix setting SysTrayIcon visible after explicitly hiding it MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit After hiding the QSystemTrayIcon explicitly with .setVisible(false) resetting visibility with .setVisible(true) does not generate NIM_MODIFY message and thus preventing the tray icon from being visible again. Fixes: QTBUG-118133 Pick-to: 6.6 6.5 Change-Id: Ic2b1d0f293c92fec7ec697b2fe3d1da9fd0d0e44 Reviewed-by: Volker Hilsheimer Reviewed-by: Timothée Keller --- src/plugins/platforms/windows/qwindowssystemtrayicon.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/plugins/platforms/windows/qwindowssystemtrayicon.cpp b/src/plugins/platforms/windows/qwindowssystemtrayicon.cpp index d688d68e2b..d9e84c379e 100644 --- a/src/plugins/platforms/windows/qwindowssystemtrayicon.cpp +++ b/src/plugins/platforms/windows/qwindowssystemtrayicon.cpp @@ -164,8 +164,6 @@ void QWindowsSystemTrayIcon::cleanup() void QWindowsSystemTrayIcon::updateIcon(const QIcon &icon) { qCDebug(lcQpaTrayIcon) << __FUNCTION__ << '(' << icon << ')' << this; - if (icon.cacheKey() == m_icon.cacheKey()) - return; m_icon = icon; const HICON hIconToDestroy = createIcon(icon); if (ensureInstalled())