Commit db56189f authored by Frank Richter's avatar Frank Richter Committed by Alexandre Julliard

Have the theme INI file parsed upon theme activation and not just when

the first theme data is requested; that way, the themed system colors are set correctly from the start, and not just after some theme data was requested.
parent 2adcf683
......@@ -45,6 +45,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(uxtheme);
BOOL MSSTYLES_GetNextInteger(LPCWSTR lpStringStart, LPCWSTR lpStringEnd, LPCWSTR *lpValEnd, int *value);
BOOL MSSTYLES_GetNextToken(LPCWSTR lpStringStart, LPCWSTR lpStringEnd, LPCWSTR *lpValEnd, LPWSTR lpBuff, DWORD buffSize);
void MSSTYLES_ParseThemeIni(PTHEME_FILE tf);
extern HINSTANCE hDllInst;
......@@ -229,7 +230,11 @@ HRESULT MSSTYLES_SetActiveTheme(PTHEME_FILE tf)
MSSTYLES_CloseThemeFile(tfActiveTheme);
tfActiveTheme = tf;
if (tfActiveTheme)
{
tfActiveTheme->dwRefCount++;
if(!tfActiveTheme->classes)
MSSTYLES_ParseThemeIni(tfActiveTheme);
}
return S_OK;
}
......@@ -784,9 +789,7 @@ PTHEME_CLASS MSSTYLES_OpenThemeClass(LPCWSTR pszAppName, LPCWSTR pszClassList)
return NULL;
}
if(!tfActiveTheme->classes) {
MSSTYLES_ParseThemeIni(tfActiveTheme);
if(!tfActiveTheme->classes)
return NULL;
return NULL;
}
start = pszClassList;
......
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