Author: jimtabor
Date: Thu Sep 13 01:22:33 2012
New Revision: 57290
URL:
http://svn.reactos.org/svn/reactos?rev=57290&view=rev
Log:
[Win32SS]
- Based on wine Alexandre Julliard: ScrollWindow should not use a cached DC, unlike
ScrollWindowEx.
Modified:
trunk/reactos/win32ss/user/ntuser/painting.c
trunk/reactos/win32ss/user/user32/windows/window.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] Thu Sep 13 01:22:33 2012
@@ -1613,6 +1613,7 @@
HDC hDC;
HRGN hrgnOwn = NULL, hrgnTemp;
HWND hwndCaret;
+ DWORD dcxflags = 0;
NTSTATUS Status = STATUS_SUCCESS;
DECLARE_RETURN(DWORD);
USER_REFERENCE_ENTRY Ref, CaretRef;
@@ -1669,7 +1670,25 @@
else
hrgnOwn = IntSysCreateRectRgn(0, 0, 0, 0);
- hDC = UserGetDCEx(Window, 0, DCX_CACHE | DCX_USESTYLE);
+ /* ScrollWindow uses the window DC, ScrollWindowEx doesn't */
+ if (flags & SW_SCROLLWNDDCE)
+ {
+ dcxflags = DCX_USESTYLE;
+
+ if (!(Window->pcls->style & (CS_OWNDC|CS_CLASSDC)))
+ dcxflags |= DCX_CACHE; // AH??? wine~ If not Powned or with Class go Cheap!
+
+ if (flags & SW_SCROLLCHILDREN && Window->style &
WS_CLIPCHILDREN)
+ dcxflags |= DCX_CACHE|DCX_NOCLIPCHILDREN;
+ }
+ else
+ {
+ /* So in this case ScrollWindowEx uses Cache DC. */
+ dcxflags = DCX_CACHE|DCX_USESTYLE;
+ if (flags & SW_SCROLLCHILDREN) dcxflags |= DCX_NOCLIPCHILDREN;
+ }
+
+ hDC = UserGetDCEx(Window, 0, dcxflags);
if (!hDC)
{
/* FIXME: SetLastError? */
Modified: trunk/reactos/win32ss/user/user32/windows/window.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/user32/window…
==============================================================================
--- trunk/reactos/win32ss/user/user32/windows/window.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/user32/windows/window.c [iso-8859-1] Thu Sep 13 01:22:33
2012
@@ -1900,9 +1900,10 @@
prcClip,
0,
NULL,
- (lpRect ? 0 : SW_SCROLLCHILDREN) | SW_INVALIDATE) !=
ERROR;
-}
-
+ (lpRect ? 0 : SW_SCROLLCHILDREN) |
(SW_ERASE|SW_INVALIDATE|SW_SCROLLWNDDCE)) != ERROR;
+}
+
+/* ScrollWindow uses the window DC, ScrollWindowEx doesn't */
/*
* @implemented
@@ -1917,6 +1918,11 @@
LPRECT prcUpdate,
UINT flags)
{
+ if (flags & SW_SMOOTHSCROLL)
+ {
+ FIXME("SW_SMOOTHSCROLL not supported.");
+ // Fall through....
+ }
return NtUserScrollWindowEx(hWnd,
dx,
dy,