From 952ea029f40aaff9de0101fc165907ef8693e4aa Mon Sep 17 00:00:00 2001 From: Jonathan Liu Date: Mon, 3 Sep 2012 00:11:57 +1000 Subject: QWizard/Win: Fix incorrect cached state after all wizards destroyed If a QWizard is shown when Aero is enabled, the current visual style is cached in a static member of QVistaHelper. The cached state is updated by QVistaHelper when it receives WM_THEMECHANGED or WM_DWMCOMPOSITIONCHANGED events from Windows. If all QWizard instances are destroyed, there are no instances of QVistaHelper to receive these notifications and update the cache. If Aero is now disabled, the cached current visual style in QVistaHelper isn't updated. If a wizard is now created and shown, a large black rectangle is shown in the titlebar. A static instance count is added so that when no wizards are running, the cached state is not used. Task-number: QTBUG-27004 Change-Id: Iefe4c8552388280219c9726418ed7476b8ebb15a Reviewed-by: Miikka Heikkinen Reviewed-by: Friedemann Kleint --- src/widgets/dialogs/qwizard_win_p.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/widgets/dialogs/qwizard_win_p.h') diff --git a/src/widgets/dialogs/qwizard_win_p.h b/src/widgets/dialogs/qwizard_win_p.h index 80b5fd8241..86696952b0 100644 --- a/src/widgets/dialogs/qwizard_win_p.h +++ b/src/widgets/dialogs/qwizard_win_p.h @@ -133,6 +133,7 @@ private: void mouseReleaseEvent(QMouseEvent *event); bool eventFilter(QObject *obj, QEvent *event); + static int instanceCount; static bool is_vista; static VistaState cachedVistaState; static bool isCompositionEnabled(); -- cgit v1.2.3