Author: gadamopoulos
Date: Tue Jul 5 10:04:25 2011
New Revision: 52542
URL:
http://svn.reactos.org/svn/reactos?rev=52542&view=rev
Log:
[uxtheme]
- Fill in WINDOWINFO.cbSize before calling GetWindowInfo
- Handle invalid regions passed to WM_NCPAINT
- Handle WM_NCUAHDRAWCAPTION and WM_NCUAHDRAWFRAME without doing anything there for now
Modified:
branches/GSoC_2011/ThemesSupport/dll/win32/uxtheme/nonclient.c
Modified: branches/GSoC_2011/ThemesSupport/dll/win32/uxtheme/nonclient.c
URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2011/ThemesSupport/dll/win…
==============================================================================
--- branches/GSoC_2011/ThemesSupport/dll/win32/uxtheme/nonclient.c [iso-8859-1]
(original)
+++ branches/GSoC_2011/ThemesSupport/dll/win32/uxtheme/nonclient.c [iso-8859-1] Tue Jul 5
10:04:25 2011
@@ -1,7 +1,7 @@
/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS uxtheme.dll
- * FILE: dll/win32/uxtheme/themehooks.c
+ * FILE: dll/win32/uxtheme/nonclient.c
* PURPOSE: uxtheme non client area management
* PROGRAMMER: Giannis Adamopoulos
*/
@@ -181,6 +181,7 @@
HWND hWnd,
HRGN hRgn)
{
+ pcontext->wi.cbSize = sizeof(pcontext->wi);
GetWindowInfo(hWnd, &pcontext->wi);
pcontext->hWnd = hWnd;
pcontext->Active = IsWindowActive(hWnd, pcontext->wi.dwExStyle);
@@ -189,15 +190,11 @@
pcontext->CaptionHeight = pcontext->wi.cyWindowBorders;
pcontext->CaptionHeight += GetSystemMetrics(pcontext->wi.dwExStyle &
WS_EX_TOOLWINDOW ? SM_CYSMCAPTION : SM_CYCAPTION );
- if(hRgn <= 0)
+ if(hRgn <= (HRGN)1)
{
hRgn = CreateRectRgnIndirect(&pcontext->wi.rcWindow);
- pcontext->hRgn = hRgn;
- }
- else
- {
- pcontext->hRgn = 0;
- }
+ }
+ pcontext->hRgn = hRgn;
pcontext->hDC = GetDCEx(hWnd, hRgn, DCX_WINDOW | DCX_INTERSECTRGN | DCX_USESTYLE |
DCX_KEEPCLIPRGN);
}
@@ -905,7 +902,11 @@
Point.y = GET_Y_LPARAM(lParam);
return DefWndNCHitTest(hWnd, Point);
}
+ case WM_NCUAHDRAWCAPTION:
+ case WM_NCUAHDRAWFRAME:
+ /* FIXME: how should these be handled? */
+ return 0;
default:
return DefWndProc(hWnd, Msg, wParam, lParam);
}
-}
+}