Author: jimtabor
Date: Thu Mar 3 13:59:17 2011
New Revision: 50961
URL:
http://svn.reactos.org/svn/reactos?rev=50961&view=rev
Log:
[Win32k]
- Fix the select of the clip region for a window. Apologies to Rafal Harabien select works
like select, also don't
assume the original author is always right.
Modified:
trunk/reactos/subsystems/win32/win32k/ntuser/window.c
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/window.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/window.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/window.c [iso-8859-1] Thu Mar 3 13:59:17
2011
@@ -4052,7 +4052,7 @@
}
else
{
- hrgnCopy = IntSysCreateRectRgnIndirect(&Window->rcWindow); //HRGN_WINDOW;
+ hrgnCopy = NULL;
}
if (Window->hrgnClip)
@@ -4061,12 +4061,14 @@
GreDeleteObject(Window->hrgnClip);
}
- if (Window->fnid != FNID_DESKTOP)
- NtGdiOffsetRgn(hrgnCopy, Window->rcWindow.left, Window->rcWindow.top);
-
- /* Set public ownership */
- IntGdiSetRegionOwner(hrgnCopy, GDI_OBJ_HMGR_PUBLIC);
-
+ if (hrgnCopy)
+ {
+ if (Window->fnid != FNID_DESKTOP)
+ NtGdiOffsetRgn(hrgnCopy, Window->rcWindow.left, Window->rcWindow.top);
+
+ /* Set public ownership */
+ IntGdiSetRegionOwner(hrgnCopy, GDI_OBJ_HMGR_PUBLIC);
+ }
Window->hrgnClip = hrgnCopy;
Ret = co_WinPosSetWindowPos(Window, HWND_TOP, 0, 0, 0, 0, bRedraw ? flags :
(flags|SWP_NOREDRAW) );