uxtheme: Send WM_THEMECHANGED instead of posting it in SetWindowTheme().

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51348
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zhiyi Zhang 2021-07-02 11:36:59 +08:00 committed by Alexandre Julliard
parent 064dad2342
commit fe257dde58
2 changed files with 3 additions and 3 deletions

View File

@ -698,7 +698,7 @@ HRESULT WINAPI SetWindowTheme(HWND hwnd, LPCWSTR pszSubAppName,
if(SUCCEEDED(hr))
hr = UXTHEME_SetWindowProperty(hwnd, atSubIdList, pszSubIdList);
if(SUCCEEDED(hr))
UXTHEME_broadcast_msg (hwnd, WM_THEMECHANGED);
SendMessageW(hwnd, WM_THEMECHANGED, 0, 0);
return hr;
}

View File

@ -233,8 +233,8 @@ static void test_SetWindowTheme(void)
}
DispatchMessageA(&msg);
}
ok_sequence(sequences, PARENT_SEQ_INDEX, SetWindowThemeSeq, "SetWindowTheme parent", TRUE);
ok_sequence(sequences, CHILD_SEQ_INDEX, EmptySeq, "SetWindowTheme child", TRUE);
ok_sequence(sequences, PARENT_SEQ_INDEX, SetWindowThemeSeq, "SetWindowTheme parent", FALSE);
ok_sequence(sequences, CHILD_SEQ_INDEX, EmptySeq, "SetWindowTheme child", FALSE);
DestroyWindow(hWnd);
UnregisterClassA("TestSetWindowThemeParentClass", GetModuleHandleA(0));
UnregisterClassA("TestSetWindowThemeChildClass", GetModuleHandleA(0));