Author: gadamopoulos Date: Thu Jan 16 21:47:26 2014 New Revision: 61649
URL: http://svn.reactos.org/svn/reactos?rev=61649&view=rev Log: [uxtheme] - Use ExtCreateRegion in GetThemeBackgroundRegion as it was fixed in win32k
Modified: trunk/reactos/dll/win32/uxtheme/draw.c
Modified: trunk/reactos/dll/win32/uxtheme/draw.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/uxtheme/draw.c?re... ============================================================================== --- trunk/reactos/dll/win32/uxtheme/draw.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/uxtheme/draw.c [iso-8859-1] Thu Jan 16 21:47:26 2014 @@ -1755,20 +1755,15 @@ static HRGN UXTHEME_RegionFromDibBits(RGBQUAD* pBuffer, RGBQUAD* pclrTransparent, LPCRECT pRect) { int x, y, xstart; -#ifdef EXTCREATEREGION_WORKS int cMaxRgnRects, cRgnDataSize, cRgnRects; RECT* prcCurrent; PRGNDATA prgnData; -#else - HRGN hrgnTemp; -#endif ULONG clrTransparent, *pclrCurrent; HRGN hrgnRet;
pclrCurrent = (PULONG)pBuffer; clrTransparent = *(PULONG)pclrTransparent;
-#ifdef EXTCREATEREGION_WORKS /* Create a region and pre-allocate memory enough for 3 spaces in one row*/ cRgnRects = 0; cMaxRgnRects = 4* (pRect->bottom-pRect->top); @@ -1778,9 +1773,6 @@ prgnData = (PRGNDATA)HeapAlloc(GetProcessHeap(), 0, cRgnDataSize);
prcCurrent = (PRECT)prgnData->Buffer; -#else - hrgnRet = CreateRectRgn(0,0,0,0); -#endif
/* Calculate the region rects */ y=0; @@ -1804,7 +1796,6 @@ pclrCurrent++; }
-#ifdef EXTCREATEREGION_WORKS /* Add the scaned line to the region */ SetRect(prcCurrent, xstart, y,x,y+1); prcCurrent++; @@ -1821,11 +1812,6 @@ cRgnDataSize); prcCurrent = (RECT*)prgnData->Buffer + cRgnRects; } -#else - hrgnTemp = CreateRectRgn(xstart, y,x,y+1); - CombineRgn(hrgnRet, hrgnRet, hrgnTemp, RGN_OR ); - DeleteObject(hrgnTemp); -#endif } else { @@ -1836,7 +1822,6 @@ y++; }
-#ifdef EXTCREATEREGION_WORKS /* Fill the region data header */ prgnData->rdh.dwSize = sizeof(prgnData->rdh); prgnData->rdh.iType = RDH_RECTANGLES; @@ -1849,7 +1834,6 @@
/* Free the region data*/ HeapFree(GetProcessHeap(),0,prgnData); -#endif
/* return the region*/ return hrgnRet;