From be4e3082f7803f371c6f7a61f6e7770bfd67736d Mon Sep 17 00:00:00 2001 From: Volker Hilsheimer Date: Thu, 28 Nov 2024 15:56:35 +0100 Subject: [PATCH] Vista style: don't use transitions unless desktop-settings aware Change-Id: Ib93c18406e324df854765b309cb7c1cdca7a194d Reviewed-by: Axel Spoerl --- .../styles/modernwindows/qwindowsvistastyle.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/plugins/styles/modernwindows/qwindowsvistastyle.cpp b/src/plugins/styles/modernwindows/qwindowsvistastyle.cpp index 907a9f7d7d4..4ef47c36da9 100644 --- a/src/plugins/styles/modernwindows/qwindowsvistastyle.cpp +++ b/src/plugins/styles/modernwindows/qwindowsvistastyle.cpp @@ -204,11 +204,12 @@ void QWindowsVistaStylePrivate::cleanup(bool force) bool QWindowsVistaStylePrivate::transitionsEnabled() const { - BOOL animEnabled = false; - if (SystemParametersInfo(SPI_GETCLIENTAREAANIMATION, 0, &animEnabled, 0)) - { - if (animEnabled) - return true; + if (QApplication::desktopSettingsAware()) { + BOOL animEnabled = false; + if (SystemParametersInfo(SPI_GETCLIENTAREAANIMATION, 0, &animEnabled, 0)) { + if (animEnabled) + return true; + } } return false; }