[UXTHEME] -Don't change the behaviour of DefWindowProc if SetWindowRgn was called...
authorGiannis Adamopoulos <gadamopoulos@reactos.org>
Tue, 21 Nov 2017 08:51:06 +0000 (10:51 +0200)
committerGiannis Adamopoulos <gadamopoulos@reactos.org>
Tue, 21 Nov 2017 08:52:56 +0000 (10:52 +0200)
dll/win32/uxtheme/themehooks.c

index 43620d8..48cfdb2 100644 (file)
@@ -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,