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@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zhiyi Zhang 2021-11-04 14:44:47 +08:00 committed by Alexandre Julliard
parent 2f1bbd88ed
commit 3762a11c81
1 changed files with 1 additions and 3 deletions

View File

@ -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 {