Author: gadamopoulos
Date: Sun Aug 7 20:42:22 2011
New Revision: 53124
URL:
http://svn.reactos.org/svn/reactos?rev=53124&view=rev
Log:
[uxtheme]
- Broadcast WM_THEMECHANGED when hook themes are activated
- Do not call UXTHEME_LoadTheme in the hook theme callback. It will now be called when the
application gets WM_THEMECHANGED
Modified:
branches/GSoC_2011/ThemesSupport/dll/win32/uxtheme/system.c
branches/GSoC_2011/ThemesSupport/dll/win32/uxtheme/themehooks.c
branches/GSoC_2011/ThemesSupport/dll/win32/uxtheme/uxthemedll.h
Modified: branches/GSoC_2011/ThemesSupport/dll/win32/uxtheme/system.c
URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2011/ThemesSupport/dll/win…
==============================================================================
--- branches/GSoC_2011/ThemesSupport/dll/win32/uxtheme/system.c [iso-8859-1] (original)
+++ branches/GSoC_2011/ThemesSupport/dll/win32/uxtheme/system.c [iso-8859-1] Sun Aug 7
20:42:22 2011
@@ -79,7 +79,7 @@
}
/* Broadcast a message to *all* windows, including children */
-static BOOL CALLBACK UXTHEME_broadcast_msg (HWND hWnd, LPARAM msg)
+BOOL CALLBACK UXTHEME_broadcast_msg (HWND hWnd, LPARAM msg)
{
if (hWnd == NULL)
{
Modified: branches/GSoC_2011/ThemesSupport/dll/win32/uxtheme/themehooks.c
URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2011/ThemesSupport/dll/win…
==============================================================================
--- branches/GSoC_2011/ThemesSupport/dll/win32/uxtheme/themehooks.c [iso-8859-1]
(original)
+++ branches/GSoC_2011/ThemesSupport/dll/win32/uxtheme/themehooks.c [iso-8859-1] Sun Aug
7 20:42:22 2011
@@ -130,8 +130,6 @@
UAH_HOOK_MESSAGE(puah->WndProcArray, WM_THEMECHANGED);
UAH_HOOK_MESSAGE(puah->WndProcArray, WM_UAHINIT);
- UXTHEME_LoadTheme();
-
return TRUE;
}
@@ -143,6 +141,7 @@
{
PVOID lpFunc;
OSVERSIONINFO osvi;
+ BOOL ret;
lpFunc = GetProcAddress(GetModuleHandle("user32.dll"),
"RegisterUserApiHook");
@@ -153,7 +152,7 @@
if ( osvi.dwMajorVersion == 5 && osvi.dwMinorVersion == 1)
{
PREGISTER_UAH_WINXP lpfuncxp = (PREGISTER_UAH_WINXP)lpFunc;
- return lpfuncxp(hDllInst, ThemeInitApiHook);
+ ret = lpfuncxp(hDllInst, ThemeInitApiHook);
}
else if ( osvi.dwMajorVersion == 5 && osvi.dwMinorVersion == 2)
{
@@ -166,13 +165,17 @@
uah.m_dllname2 = NULL;
uah.m_funname2 = NULL;
- return lpfunc2003(&uah);
+ ret = lpfunc2003(&uah);
}
else
{
UNIMPLEMENTED;
- return FALSE;
+ ret = FALSE;
}
+
+ UXTHEME_broadcast_msg (NULL, WM_THEMECHANGED);
+
+ return ret;
}
BOOL WINAPI
Modified: branches/GSoC_2011/ThemesSupport/dll/win32/uxtheme/uxthemedll.h
URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2011/ThemesSupport/dll/win…
==============================================================================
--- branches/GSoC_2011/ThemesSupport/dll/win32/uxtheme/uxthemedll.h [iso-8859-1]
(original)
+++ branches/GSoC_2011/ThemesSupport/dll/win32/uxtheme/uxthemedll.h [iso-8859-1] Sun Aug
7 20:42:22 2011
@@ -96,6 +96,7 @@
extern void UXTHEME_InitSystem(HINSTANCE hInst);
extern void UXTHEME_LoadTheme(void);
+extern BOOL CALLBACK UXTHEME_broadcast_msg (HWND hWnd, LPARAM msg);
/* No alpha blending */
#define ALPHABLEND_NONE 0