summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@qt.io>2023-10-17 16:06:19 +0200
committerTor Arne Vestbø <tor.arne.vestbo@qt.io>2023-10-17 23:34:22 +0200
commit8f2828683e2ac44a282e8f061de1c76925abcec1 (patch)
tree50ccaad0d45e9d7495ba4ef0efff77a9c26b212d
parent7152a1d0be2f7fc8f5418e21b1f838bafa7a2938 (diff)
Windows: Don't re-apply application badge if one has not been set
We need to re-apply the application badge when the color scheme changes; when a task bar button is being created for the fist time; or after Explorer has crashed and re-started. But we should only do that if the user has set an application badge via our APIs. Otherwise we might end up clearing an existing badge that was set via the native APIs directly. Fixes: QTBUG-118117 Pick-to: 6.5 6.6 Change-Id: I1f1fecba44c118d4e3f7ef4119139c3ebd23f047 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
-rw-r--r--src/plugins/platforms/windows/qwindowsintegration.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/platforms/windows/qwindowsintegration.cpp b/src/plugins/platforms/windows/qwindowsintegration.cpp
index 23720ca4ef..9bf19cfc36 100644
--- a/src/plugins/platforms/windows/qwindowsintegration.cpp
+++ b/src/plugins/platforms/windows/qwindowsintegration.cpp
@@ -780,7 +780,8 @@ void QWindowsIntegration::updateApplicationBadge()
// to a task bar button being created for the fist time or after
// Explorer had crashed and re-started. In any case, re-apply the
// badge so that everything is up to date.
- setApplicationBadge(m_applicationBadgeNumber);
+ if (m_applicationBadgeNumber)
+ setApplicationBadge(m_applicationBadgeNumber);
}
#if QT_CONFIG(vulkan)