From 72331b450da77f9af30af497d9c194da656c7296 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.5 Change-Id: Ic2b1d0f293c92fec7ec697b2fe3d1da9fd0d0e44 Reviewed-by: Volker Hilsheimer Reviewed-by: Timothée Keller (cherry picked from commit 77e0e7c414b7547a36734cfea3e5b237329c93ab) Reviewed-by: Qt Cherry-pick Bot --- 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 3bad237f9ec..39069a651fd 100644 --- a/src/plugins/platforms/windows/qwindowssystemtrayicon.cpp +++ b/src/plugins/platforms/windows/qwindowssystemtrayicon.cpp @@ -162,8 +162,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())