https://git.reactos.org/?p=reactos.git;a=commitdiff;h=7e9f56229f8287f597c4a…
commit 7e9f56229f8287f597c4a78fd215d3e3e359a873
Author: Giannis Adamopoulos <gadamopoulos(a)reactos.org>
AuthorDate: Fri Jan 12 18:52:08 2018 +0200
Commit: Giannis Adamopoulos <gadamopoulos(a)reactos.org>
CommitDate: Mon Jan 15 12:57:08 2018 +0200
[UXTHEME] -Pass a non 0 wParam when themes get enabled and 0 when they get disabled
---
dll/win32/uxtheme/system.c | 20 ++++++++++----------
dll/win32/uxtheme/themehooks.c | 4 ++--
dll/win32/uxtheme/uxthemep.h | 2 +-
3 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/dll/win32/uxtheme/system.c b/dll/win32/uxtheme/system.c
index 84d703d157..2fb1ac8b5a 100644
--- a/dll/win32/uxtheme/system.c
+++ b/dll/win32/uxtheme/system.c
@@ -58,23 +58,23 @@ int g_cHandles;
/***********************************************************************/
-static BOOL CALLBACK UXTHEME_broadcast_msg_enumchild (HWND hWnd, LPARAM msg)
+static BOOL CALLBACK UXTHEME_send_theme_changed (HWND hWnd, LPARAM enable)
{
- SendMessageW(hWnd, msg, 0, 0);
+ SendMessageW(hWnd, WM_THEMECHANGED, enable, 0);
return TRUE;
}
-/* Broadcast a message to *all* windows, including children */
-BOOL CALLBACK UXTHEME_broadcast_msg (HWND hWnd, LPARAM msg)
+/* Broadcast WM_THEMECHANGED to *all* windows, including children */
+BOOL CALLBACK UXTHEME_broadcast_theme_changed (HWND hWnd, LPARAM enable)
{
if (hWnd == NULL)
{
- EnumWindows (UXTHEME_broadcast_msg, msg);
+ EnumWindows (UXTHEME_broadcast_theme_changed, enable);
}
else
{
- SendMessageW(hWnd, msg, 0, 0);
- EnumChildWindows (hWnd, UXTHEME_broadcast_msg_enumchild, msg);
+ UXTHEME_send_theme_changed(hWnd, enable);
+ EnumChildWindows (hWnd, UXTHEME_send_theme_changed, enable);
}
return TRUE;
}
@@ -658,7 +658,7 @@ HRESULT WINAPI EnableTheming(BOOL fEnable)
RegSetValueExW(hKey, szThemeActive, 0, REG_SZ, (LPBYTE)szEnabled,
sizeof(WCHAR));
RegCloseKey(hKey);
}
- UXTHEME_broadcast_msg (NULL, WM_THEMECHANGED);
+ UXTHEME_broadcast_theme_changed (NULL, fEnable);
}
return S_OK;
}
@@ -884,7 +884,7 @@ HRESULT WINAPI SetWindowTheme(HWND hwnd, LPCWSTR pszSubAppName,
if (!SUCCEEDED(hr))
return hr;
- UXTHEME_broadcast_msg (hwnd, WM_THEMECHANGED);
+ UXTHEME_broadcast_theme_changed (hwnd, TRUE);
return hr;
}
@@ -1160,7 +1160,7 @@ HRESULT WINAPI ApplyTheme(HTHEMEFILE hThemeFile, char *unknown, HWND
hWnd)
HRESULT hr;
TRACE("(%p,%s,%p)\n", hThemeFile, unknown, hWnd);
hr = UXTHEME_ApplyTheme(hThemeFile);
- UXTHEME_broadcast_msg (NULL, WM_THEMECHANGED);
+ UXTHEME_broadcast_theme_changed (NULL, (g_ActiveThemeFile != NULL));
return hr;
}
diff --git a/dll/win32/uxtheme/themehooks.c b/dll/win32/uxtheme/themehooks.c
index e87b6d0abe..99811808f7 100644
--- a/dll/win32/uxtheme/themehooks.c
+++ b/dll/win32/uxtheme/themehooks.c
@@ -697,7 +697,7 @@ ThemeHooksInstall()
ret = FALSE;
}
- UXTHEME_broadcast_msg (NULL, WM_THEMECHANGED);
+ UXTHEME_broadcast_theme_changed (NULL, TRUE);
return ret;
}
@@ -709,7 +709,7 @@ ThemeHooksRemove()
ret = UnregisterUserApiHook();
- UXTHEME_broadcast_msg (NULL, WM_THEMECHANGED);
+ UXTHEME_broadcast_theme_changed (NULL, FALSE);
return ret;
}
diff --git a/dll/win32/uxtheme/uxthemep.h b/dll/win32/uxtheme/uxthemep.h
index 8aeb65d98a..2708cdd48f 100644
--- a/dll/win32/uxtheme/uxthemep.h
+++ b/dll/win32/uxtheme/uxthemep.h
@@ -256,7 +256,7 @@ extern BOOL g_bThemeHooksActive;
void UXTHEME_InitSystem(HINSTANCE hInst);
void UXTHEME_LoadTheme(BOOL bLoad);
-BOOL CALLBACK UXTHEME_broadcast_msg (HWND hWnd, LPARAM msg);
+BOOL CALLBACK UXTHEME_broadcast_theme_changed (HWND hWnd, LPARAM enable);
/* No alpha blending */
#define ALPHABLEND_NONE 0