Zhiyi Zhang : uxtheme: Fix loading a different theme when theming is on.

Alexandre Julliard julliard at winehq.org
Thu Nov 4 17:04:21 CDT 2021


Module: wine
Branch: master
Commit: 3762a11c81455edee65881702c5c26ae5d3081b3
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=3762a11c81455edee65881702c5c26ae5d3081b3

Author: Zhiyi Zhang <zzhang at codeweavers.com>
Date:   Thu Nov  4 14:44:47 2021 +0800

uxtheme: Fix loading a different theme when theming is on.

When a theme is already active and a user tries to activate another theme,
the new theme configuration should be written to the registry so that it's
still in effect after a wine reboot.

Fix a regression introduced in d290362.

Signed-off-by: Zhiyi Zhang <zzhang at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/uxtheme/system.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/dlls/uxtheme/system.c b/dlls/uxtheme/system.c
index ba579a02edc..bf72baccebb 100644
--- a/dlls/uxtheme/system.c
+++ b/dlls/uxtheme/system.c
@@ -446,10 +446,8 @@ HRESULT UXTHEME_SetActiveTheme(PTHEME_FILE tf)
                 WARN("Failed to get LoadedBefore: %d\n", GetLastError());
             RegCloseKey(hKey);
         }
-        if (loaded_before)
-            return MSSTYLES_SetActiveTheme(tf, FALSE);
 
-        if (ret)
+        if (!loaded_before && ret)
             UXTHEME_SaveUnthemedSystemMetrics(&metrics);
     }
     else {




More information about the wine-cvs mailing list