Zhiyi Zhang : uxtheme: Do not change system metrics in EnableTheming().
Alexandre Julliard
julliard at winehq.org
Wed Sep 22 16:04:37 CDT 2021
Module: wine
Branch: master
Commit: 27ab5f7bf4bd16964edd3a86bd4f55ab98d5b4f1
URL: https://source.winehq.org/git/wine.git/?a=commit;h=27ab5f7bf4bd16964edd3a86bd4f55ab98d5b4f1
Author: Zhiyi Zhang <zzhang at codeweavers.com>
Date: Wed Sep 22 10:24:27 2021 +0800
uxtheme: Do not change system metrics in EnableTheming().
Signed-off-by: Zhiyi Zhang <zzhang at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/uxtheme/system.c | 2 --
dlls/uxtheme/tests/system.c | 5 -----
2 files changed, 7 deletions(-)
diff --git a/dlls/uxtheme/system.c b/dlls/uxtheme/system.c
index 193e8f80538..18b93435e4c 100644
--- a/dlls/uxtheme/system.c
+++ b/dlls/uxtheme/system.c
@@ -576,8 +576,6 @@ HRESULT WINAPI EnableTheming(BOOL fEnable)
if (bThemeActive && !fEnable)
{
- UXTHEME_RestoreSystemMetrics();
- UXTHEME_SaveSystemMetrics ();
bThemeActive = fEnable;
if(!RegOpenKeyW(HKEY_CURRENT_USER, szThemeManager, &hKey)) {
RegSetValueExW(hKey, L"ThemeActive", 0, REG_SZ, (BYTE *)L"0", 2 * sizeof(WCHAR));
diff --git a/dlls/uxtheme/tests/system.c b/dlls/uxtheme/tests/system.c
index 3d85bffeaf7..f56c3d2c273 100644
--- a/dlls/uxtheme/tests/system.c
+++ b/dlls/uxtheme/tests/system.c
@@ -1195,7 +1195,6 @@ static void test_EnableTheming(void)
size = sizeof(color_string);
ls = RegQueryValueExW(hkey, L"Scrollbar", NULL, NULL, (BYTE *)color_string, &size);
ok(!ls, "RegQueryValueExW failed, ls %#x.\n", ls);
- todo_wine
ok(!lstrcmpW(color_string, new_color_string), "Expected %s, got %s.\n",
wine_dbgstr_w(new_color_string), wine_dbgstr_w(color_string));
@@ -1204,7 +1203,6 @@ static void test_EnableTheming(void)
ok(flat_menu == new_flat_menu, "Expected %d, got %d.\n", new_flat_menu, flat_menu);
ret = SystemParametersInfoW(SPI_GETGRADIENTCAPTIONS, 0, &gradient_caption, 0);
ok(ret, "SystemParametersInfoW failed, error %u.\n", GetLastError());
- todo_wine
ok(gradient_caption == new_gradient_caption, "Expected %d, got %d.\n",
new_gradient_caption, gradient_caption);
@@ -1212,13 +1210,11 @@ static void test_EnableTheming(void)
ncm.cbSize = FIELD_OFFSET(NONCLIENTMETRICSW, iPaddedBorderWidth);
ret = SystemParametersInfoW(SPI_GETNONCLIENTMETRICS, sizeof(ncm), &ncm, 0);
ok(ret, "SystemParametersInfoW failed, error %u.\n", GetLastError());
- todo_wine
ok(!memcmp(&ncm, &new_ncm, sizeof(ncm)), "Expected non-client metrics unchanged.\n");
memset(&logfont, 0, sizeof(logfont));
ret = SystemParametersInfoW(SPI_GETICONTITLELOGFONT, sizeof(logfont), &logfont, 0);
ok(ret, "SystemParametersInfoW failed, error %u.\n", GetLastError());
- todo_wine
ok(!memcmp(&logfont, &new_logfont, sizeof(logfont)),
"Expected icon title font unchanged.\n");
@@ -1226,7 +1222,6 @@ static void test_EnableTheming(void)
hr = EnableTheming(TRUE);
ok(hr == S_OK, "EnableTheming failed, hr %#x.\n", hr);
is_theme_active = IsThemeActive();
- todo_wine
ok(!is_theme_active || broken(is_theme_active), /* Win8+ can no longer disable theming */
"Expected theming inactive.\n");
More information about the wine-cvs
mailing list