Author: gadamopoulos
Date: Mon Jul 11 18:17:11 2011
New Revision: 52639
URL:
http://svn.reactos.org/svn/reactos?rev=52639&view=rev
Log:
[uxtheme]
- After doing any drawing operation for the non client area, restore the previously opened
theme. Fixes GetWindowTheme
Modified:
branches/GSoC_2011/ThemesSupport/dll/win32/uxtheme/ncthm.h
branches/GSoC_2011/ThemesSupport/dll/win32/uxtheme/nonclient.c
branches/GSoC_2011/ThemesSupport/dll/win32/uxtheme/system.c
Modified: branches/GSoC_2011/ThemesSupport/dll/win32/uxtheme/ncthm.h
URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2011/ThemesSupport/dll/win…
==============================================================================
--- branches/GSoC_2011/ThemesSupport/dll/win32/uxtheme/ncthm.h [iso-8859-1] (original)
+++ branches/GSoC_2011/ThemesSupport/dll/win32/uxtheme/ncthm.h [iso-8859-1] Mon Jul 11
18:17:11 2011
@@ -4,6 +4,7 @@
HWND hWnd;
HDC hDC;
HTHEME theme;
+ HTHEME hPrevTheme;
WINDOWINFO wi;
BOOL Active; /* wi.dwWindowStatus isn't correct for mdi child windows */
HRGN hRgn;
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] Mon Jul 11
18:17:11 2011
@@ -165,6 +165,7 @@
GetWindowInfo(hWnd, &pcontext->wi);
pcontext->hWnd = hWnd;
pcontext->Active = IsWindowActive(hWnd, pcontext->wi.dwExStyle);
+ pcontext->hPrevTheme = GetPropW(hWnd, (LPCWSTR)MAKEINTATOM(atWindowTheme));
pcontext->theme = OpenThemeData(pcontext->hWnd, L"WINDOW");
pcontext->CaptionHeight = pcontext->wi.cyWindowBorders;
@@ -185,6 +186,8 @@
ReleaseDC(pcontext->hWnd ,pcontext->hDC);
CloseThemeData (pcontext->theme);
+
+ SetPropW(pcontext->hWnd, (LPCWSTR)MAKEINTATOM(atWindowTheme),
pcontext->hPrevTheme);
if(pcontext->hRgn != NULL)
{
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] Mon Jul 11
18:17:11 2011
@@ -61,7 +61,7 @@
ATOM atDialogThemeEnabled;
static DWORD dwThemeAppProperties = STAP_ALLOW_NONCLIENT | STAP_ALLOW_CONTROLS;
-static ATOM atWindowTheme;
+ATOM atWindowTheme;
static ATOM atSubAppName;
static ATOM atSubIdList;