Author: jroeloffzen
Date: Sat Aug 21 13:10:15 2010
New Revision: 48577
URL:
http://svn.reactos.org/svn/reactos?rev=48577&view=rev
Log:
[user32]
- Revert 48571
- Thou shall not fix wine where it ain't broken. Credits Gabriel Ilardi.
- See bug 5303
Modified:
branches/arwinss/reactos/dll/win32/user32/painting.c
Modified: branches/arwinss/reactos/dll/win32/user32/painting.c
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/user3…
==============================================================================
--- branches/arwinss/reactos/dll/win32/user32/painting.c [iso-8859-1] (original)
+++ branches/arwinss/reactos/dll/win32/user32/painting.c [iso-8859-1] Sat Aug 21 13:10:15
2010
@@ -911,13 +911,10 @@
const DWORD user_flags = clip_flags | DCX_NORESETATTRS; /* flags that can be set by
user */
struct dce *dce;
BOOL bUpdateVisRgn = TRUE;
- BOOL bWndVisible;
HWND parent;
- HWND desktop = GetDesktopWindow();
LONG window_style = GetWindowLongW( hwnd, GWL_STYLE );
- LONG parent_style;
-
- if (!hwnd) hwnd = desktop;
+
+ if (!hwnd) hwnd = GetDesktopWindow();
else hwnd = WIN_GetFullHandle( hwnd );
TRACE("hwnd %p, hrgnClip %p, flags %08x\n", hwnd, hrgnClip, flags);
@@ -945,18 +942,17 @@
if (flags & DCX_WINDOW) flags &= ~DCX_CLIPCHILDREN;
- if ( !(parent = GetAncestor( hwnd, GA_PARENT)) ) parent = desktop;
- if (parent == desktop)
+ parent = GetAncestor( hwnd, GA_PARENT );
+ if (!parent || (parent == GetDesktopWindow()))
flags = (flags & ~DCX_PARENTCLIP) | DCX_CLIPSIBLINGS;
- parent_style = GetWindowLongW( parent, GWL_STYLE );
- bWndVisible = (window_style & WS_VISIBLE) && (parent_style &
WS_VISIBLE);
/* it seems parent clip is ignored when clipping siblings or children */
if (flags & (DCX_CLIPSIBLINGS | DCX_CLIPCHILDREN)) flags &= ~DCX_PARENTCLIP;
if( flags & DCX_PARENTCLIP )
{
- if (bWndVisible)
+ LONG parent_style = GetWindowLongW( parent, GWL_STYLE );
+ if( (window_style & WS_VISIBLE) && (parent_style & WS_VISIBLE) )
{
flags &= ~DCX_CLIPCHILDREN;
if (parent_style & WS_CLIPSIBLINGS) flags |= DCX_CLIPSIBLINGS;
@@ -1040,7 +1036,7 @@
if (SetHookFlags( dce->hdc, DCHF_VALIDATEVISRGN )) bUpdateVisRgn = TRUE; /* DC
was dirty */
- if (bWndVisible && bUpdateVisRgn) update_visible_region( dce );
+ if (bUpdateVisRgn) update_visible_region( dce );
TRACE("(%p,%p,0x%x): returning %p\n", hwnd, hrgnClip, flags, dce->hdc);
return dce->hdc;