uxtheme: Do not call SetWindowTheme() in EnableThemeDialogTexture().
It's no longer necessary to call SetWindowTheme() in EnableThemeDialogTexture() because dialog theming doesn't need to open theme handles associated with the dialog. Calling SetWindowTheme() also sends extra messages. Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
1e8ce36e30
commit
2adb11dd61
|
@ -60,12 +60,7 @@ HRESULT WINAPI EnableThemeDialogTexture(HWND hwnd, DWORD dwFlags)
|
|||
res = SetPropW (hwnd, (LPCWSTR)MAKEINTATOM(atDialogThemeEnabled),
|
||||
UlongToHandle(dwFlags|0x80000000));
|
||||
/* 0x80000000 serves as a "flags set" flag */
|
||||
if (!res)
|
||||
return HRESULT_FROM_WIN32(GetLastError());
|
||||
if (dwFlags & ETDT_USETABTEXTURE)
|
||||
return SetWindowTheme (hwnd, NULL, L"Tab");
|
||||
else
|
||||
return SetWindowTheme (hwnd, NULL, NULL);
|
||||
return res ? S_OK : HRESULT_FROM_WIN32(GetLastError());
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
|
|
|
@ -2018,7 +2018,7 @@ static void test_EnableThemeDialogTexture(void)
|
|||
hr = EnableThemeDialogTexture(dialog, flags[i]);
|
||||
ok(hr == S_OK, "EnableThemeDialogTexture failed, hr %#x.\n", hr);
|
||||
ok_sequence(sequences, PARENT_SEQ_INDEX, empty_seq,
|
||||
"EnableThemeDialogTexture first flag", TRUE);
|
||||
"EnableThemeDialogTexture first flag", FALSE);
|
||||
ret = IsThemeDialogTextureEnabled(dialog);
|
||||
/* Non-zero flags without ETDT_DISABLE enables dialog texture */
|
||||
todo_wine_if(flags[i] == ETDT_USETABTEXTURE || flags[i] == ETDT_USEAEROWIZARDTABTEXTURE)
|
||||
|
@ -2040,7 +2040,7 @@ static void test_EnableThemeDialogTexture(void)
|
|||
hr = EnableThemeDialogTexture(dialog, flags[j]);
|
||||
ok(hr == S_OK, "EnableThemeDialogTexture failed, hr %#x.\n", hr);
|
||||
ok_sequence(sequences, PARENT_SEQ_INDEX, empty_seq,
|
||||
"EnableThemeDialogTexture second flag", TRUE);
|
||||
"EnableThemeDialogTexture second flag", FALSE);
|
||||
ret = IsThemeDialogTextureEnabled(dialog);
|
||||
/* If the flag is zero, it will have previous dialog texture status */
|
||||
if (flags[j])
|
||||
|
|
Loading…
Reference in New Issue