From 46390286f0002bc47af22d4cb1dfa79f3a3e24c0 Mon Sep 17 00:00:00 2001 From: Zhiyi Zhang Date: Fri, 2 Jul 2021 11:36:59 +0800 Subject: [PATCH] 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 Signed-off-by: Alexandre Julliard (cherry picked from commit fe257dde58f03fe1fc9705caf24edbe16df7a1cd) Signed-off-by: Michael Stefaniuc --- dlls/uxtheme/system.c | 2 +- dlls/uxtheme/tests/system.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dlls/uxtheme/system.c b/dlls/uxtheme/system.c index aaef03f0205..f8cc876b0c9 100644 --- a/dlls/uxtheme/system.c +++ b/dlls/uxtheme/system.c @@ -685,7 +685,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; } diff --git a/dlls/uxtheme/tests/system.c b/dlls/uxtheme/tests/system.c index e008319e82a..f4719caad89 100644 --- a/dlls/uxtheme/tests/system.c +++ b/dlls/uxtheme/tests/system.c @@ -237,8 +237,8 @@ todo_wine } 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));