Commit 50005fee authored by Zhiyi Zhang's avatar Zhiyi Zhang Committed by Alexandre Julliard

uxtheme: Disallow EnableTheming() to enable theming.

parent 2cfd5c08
......@@ -571,20 +571,16 @@ BOOL WINAPI IsCompositionActive(void)
HRESULT WINAPI EnableTheming(BOOL fEnable)
{
HKEY hKey;
WCHAR szEnabled[] = L"0";
TRACE("(%d)\n", fEnable);
if(fEnable != bThemeActive) {
if(fEnable)
UXTHEME_BackupSystemMetrics();
else
UXTHEME_RestoreSystemMetrics();
if (bThemeActive && !fEnable)
{
UXTHEME_RestoreSystemMetrics();
UXTHEME_SaveSystemMetrics ();
bThemeActive = fEnable;
if(bThemeActive) szEnabled[0] = '1';
if(!RegOpenKeyW(HKEY_CURRENT_USER, szThemeManager, &hKey)) {
RegSetValueExW(hKey, L"ThemeActive", 0, REG_SZ, (BYTE*)szEnabled, sizeof(WCHAR));
RegSetValueExW(hKey, L"ThemeActive", 0, REG_SZ, (BYTE *)L"0", 2 * sizeof(WCHAR));
RegCloseKey(hKey);
}
UXTHEME_broadcast_msg (NULL, WM_THEMECHANGED);
......
......@@ -1260,7 +1260,6 @@ static void test_EnableTheming(void)
hr = EnableTheming(TRUE);
ok(hr == S_OK, "EnableTheming failed, hr %#x.\n", hr);
todo_wine
ok(!IsThemeActive(), "Expected theming inactive.\n");
hr = EnableTheming(FALSE);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment