Commit eb8eccbe authored by Zhiyi Zhang's avatar Zhiyi Zhang Committed by Alexandre Julliard

uxtheme: Fix a test failure.

pszAppName should not be changed as it's used in the loop to check if window application name is set.
parent 38d1002c
......@@ -1075,14 +1075,12 @@ PTHEME_CLASS MSSTYLES_OpenThemeClass(LPCWSTR pszAppName, LPCWSTR pszClassList, U
start = end+1;
parse_app_class_name(buf, szAppName, szClassName);
if (szAppName[0])
{
/* If the application class is already set then fail */
if (pszAppName) return NULL;
pszAppName = szAppName;
}
cls = MSSTYLES_FindClass(tfActiveTheme, pszAppName, szClassName);
/* If the window application name is set then fail */
if (szAppName[0] && pszAppName)
return NULL;
cls = MSSTYLES_FindClass(tfActiveTheme, szAppName[0] ? szAppName : pszAppName, szClassName);
/* Fall back to default class if the specified subclass is not found */
if (!cls) cls = MSSTYLES_FindClass(tfActiveTheme, NULL, szClassName);
......@@ -1090,14 +1088,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;
pszAppName = szAppName;
}
cls = MSSTYLES_FindClass(tfActiveTheme, pszAppName, szClassName);
/* If the window application name is set then fail */
if (szAppName[0] && pszAppName)
return NULL;
cls = MSSTYLES_FindClass(tfActiveTheme, szAppName[0] ? szAppName : pszAppName, szClassName);
/* Fall back to default class if the specified subclass is not found */
if (!cls) cls = MSSTYLES_FindClass(tfActiveTheme, NULL, szClassName);
}
......
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