https://git.reactos.org/?p=reactos.git;a=commitdiff;h=8f98574e1d4a2155061c4…
commit 8f98574e1d4a2155061c40816a597b7697aa6654
Author: Giannis Adamopoulos <gadamopoulos(a)reactos.org>
AuthorDate: Tue Nov 21 10:51:06 2017 +0200
[UXTHEME] -Don't change the behaviour of DefWindowProc if SetWindowRgn was called
before
---
dll/win32/uxtheme/themehooks.c | 18 +++++++++++++++---
1 file changed, 15 insertions(+), 3 deletions(-)
diff --git a/dll/win32/uxtheme/themehooks.c b/dll/win32/uxtheme/themehooks.c
index 43620d8ff3..48cfdb211a 100644
--- a/dll/win32/uxtheme/themehooks.c
+++ b/dll/win32/uxtheme/themehooks.c
@@ -267,8 +267,14 @@ int OnPostWinPosChanged(HWND hWnd, WINDOWPOS* pWinPos)
static LRESULT CALLBACK
ThemeDefWindowProcW(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam)
-{
- if(!IsAppThemed() || !(GetThemeAppProperties() & STAP_ALLOW_NONCLIENT))
+{
+ PWND_DATA pwndData;
+
+ pwndData = (PWND_DATA)GetPropW(hWnd, (LPCWSTR)MAKEINTATOM(atWndContext));
+
+ if(!IsAppThemed() ||
+ !(GetThemeAppProperties() & STAP_ALLOW_NONCLIENT) ||
+ (pwndData && pwndData->HasAppDefinedRgn))
{
return g_user32ApiHook.DefWindowProcW(hWnd,
Msg,
@@ -286,7 +292,13 @@ ThemeDefWindowProcW(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM
lParam)
static LRESULT CALLBACK
ThemeDefWindowProcA(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam)
{
- if(!IsAppThemed() || !(GetThemeAppProperties() & STAP_ALLOW_NONCLIENT))
+ PWND_DATA pwndData;
+
+ pwndData = (PWND_DATA)GetPropW(hWnd, (LPCWSTR)MAKEINTATOM(atWndContext));
+
+ if(!IsAppThemed() ||
+ !(GetThemeAppProperties() & STAP_ALLOW_NONCLIENT) ||
+ (pwndData && pwndData->HasAppDefinedRgn))
{
return g_user32ApiHook.DefWindowProcA(hWnd,
Msg,