Author: gadamopoulos
Date: Sat Sep 3 16:22:32 2011
New Revision: 53548
URL:
http://svn.reactos.org/svn/reactos?rev=53548&view=rev
Log:
[win32k]
- merge r53215 and r53221 from themes branch
- Fixes drawing apps that use SetWindowRgn and also fixes a gdi object leak
See issue #1239 for more details.
Modified:
trunk/reactos/subsystems/win32/win32k/ntuser/winpos.c
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/winpos.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/winpos.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/winpos.c [iso-8859-1] Sat Sep 3 16:22:32
2011
@@ -1026,7 +1026,7 @@
WvrFlags = co_WinPosDoNCCALCSize(Window, &WinPos, &NewWindowRect,
&NewClientRect);
- TRACE("co_WinPosDoNCCALCSize");
+ TRACE("co_WinPosDoNCCALCSize returned %d\n", WvrFlags);
/* Relink windows. (also take into account shell window in hwndShellWindow) */
if (!(WinPos.flags & SWP_NOZORDER) && WinPos.hwnd !=
UserGetShellWindow())
@@ -2088,6 +2088,9 @@
hrgnCopy = NULL;
}
+ /* Delete the region passed by the caller */
+ GreDeleteObject(hRgn);
+
if (Window->hrgnClip)
{
/* Delete no longer needed region handle */
@@ -2097,9 +2100,6 @@
if (hrgnCopy)
{
- if (Window->fnid != FNID_DESKTOP)
- NtGdiOffsetRgn(hrgnCopy, Window->rcWindow.left, Window->rcWindow.top);
-
/* Set public ownership */
IntGdiSetRegionOwner(hrgnCopy, GDI_OBJ_HMGR_PUBLIC);
}