Author: jimtabor
Date: Sun Jun 8 17:56:28 2014
New Revision: 63563
URL:
http://svn.reactos.org/svn/reactos?rev=63563&view=rev
Log:
[Win32k]
- Fix functions. Old patch from 2009.
Modified:
trunk/reactos/win32ss/user/ntuser/painting.c
Modified: trunk/reactos/win32ss/user/ntuser/painting.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/painti…
==============================================================================
--- trunk/reactos/win32ss/user/ntuser/painting.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/ntuser/painting.c [iso-8859-1] Sun Jun 8 17:56:28 2014
@@ -2141,7 +2141,13 @@
CONST RECT *lpUnsafeRect,
BOOL bErase)
{
- return NtUserRedrawWindow(hWnd, lpUnsafeRect, NULL, RDW_INVALIDATE | (bErase?
RDW_ERASE : 0));
+ UINT flags = RDW_INVALIDATE | (bErase ? RDW_ERASE : 0);
+ if (!hWnd)
+ {
+ flags = RDW_ALLCHILDREN | RDW_INVALIDATE | RDW_FRAME | RDW_ERASE | RDW_ERASENOW;
+ lpUnsafeRect = NULL;
+ }
+ return NtUserRedrawWindow(hWnd, lpUnsafeRect, NULL, flags);
}
BOOL
@@ -2151,6 +2157,11 @@
HRGN hRgn,
BOOL bErase)
{
+ if (!hWnd)
+ {
+ EngSetLastError( ERROR_INVALID_WINDOW_HANDLE );
+ return FALSE;
+ }
return NtUserRedrawWindow(hWnd, NULL, hRgn, RDW_INVALIDATE | (bErase? RDW_ERASE :
0));
}
@@ -2197,11 +2208,13 @@
HWND hWnd,
const RECT *lpRect)
{
- if (hWnd)
+ UINT flags = RDW_VALIDATE;
+ if (!hWnd)
{
- return NtUserRedrawWindow(hWnd, lpRect, NULL, RDW_VALIDATE );
+ flags = RDW_ALLCHILDREN | RDW_INVALIDATE | RDW_FRAME | RDW_ERASE | RDW_ERASENOW;
+ lpRect = NULL;
}
- return NtUserRedrawWindow(hWnd, lpRect, NULL,
RDW_INVALIDATE|RDW_ERASE|RDW_ERASENOW|RDW_ALLCHILDREN);
+ return NtUserRedrawWindow(hWnd, lpRect, NULL, flags);
}
/* EOF */