From: Dmitry Timoshkov dmitry@baikal.ru
Signed-off-by: Dmitry Timoshkov dmitry@baikal.ru --- dlls/uxtheme/msstyles.c | 10 ++++++++++ dlls/uxtheme/tests/system.c | 2 -- 2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/dlls/uxtheme/msstyles.c b/dlls/uxtheme/msstyles.c index e0f4e538ec6..81757898005 100644 --- a/dlls/uxtheme/msstyles.c +++ b/dlls/uxtheme/msstyles.c @@ -1076,7 +1076,12 @@ PTHEME_CLASS MSSTYLES_OpenThemeClass(LPCWSTR pszAppName, LPCWSTR pszClassList, U
parse_app_class_name(buf, szAppName, szClassName); if (szAppName[0]) + { + /* If the application class is already set then fail */ + if (pszAppName) return NULL; + cls = MSSTYLES_FindClass(tfActiveTheme, szAppName, szClassName); + } else { cls = MSSTYLES_FindClass(tfActiveTheme, pszAppName, szClassName); @@ -1088,7 +1093,12 @@ PTHEME_CLASS MSSTYLES_OpenThemeClass(LPCWSTR pszAppName, LPCWSTR pszClassList, U if(!cls && *start) { parse_app_class_name(start, szAppName, szClassName); if (szAppName[0]) + { + /* If the application class is already set then fail */ + if (pszAppName) return NULL; + cls = MSSTYLES_FindClass(tfActiveTheme, szAppName, szClassName); + } else { cls = MSSTYLES_FindClass(tfActiveTheme, pszAppName, szClassName); diff --git a/dlls/uxtheme/tests/system.c b/dlls/uxtheme/tests/system.c index 4e01a076ddd..e29bfbd68a9 100644 --- a/dlls/uxtheme/tests/system.c +++ b/dlls/uxtheme/tests/system.c @@ -562,9 +562,7 @@ static void test_OpenThemeData(void) ok(hRes == S_OK, "Got unexpected hr %#lx.\n", hRes); SetLastError(0xdeadbeef); hTheme = OpenThemeData(hWnd, L"explorer::treeview"); - todo_wine ok(!hTheme, "OpenThemeData() should fail\n"); - todo_wine ok(GetLastError() == E_PROP_ID_UNSUPPORTED, "Got unexpected %#lx.\n", GetLastError()); SetWindowTheme(hWnd, NULL, NULL);