Add DCX_CLIPSIBLINGS to flags for DCE_GetVisRgn only if window has WS_CLIPSIBLINGS bit set
Dmitry Timoshkov
dmitry at sloboda.ru
Sat Mar 3 06:03:36 CST 2001
Hello.
This patch removes my old SetWindowPos patch and replaces it
by the really correct one. Thanks to Gerard Patel for providing
test application and pointing out to the real problem.
Changelog:
Dmitry Timoshkov <dmitry at codeweavers.com>
Add DCX_CLIPSIBLINGS to flags for DCE_GetVisRgn only if window
has WS_CLIPSIBLINGS bit set.
--- cvs/wine/windows/winpos.c Sat Mar 3 12:39:58 2001
+++ wine/windows/winpos.c Sat Mar 3 13:38:23 2001
@@ -2244,6 +2244,7 @@
RECT r;
HRGN newVisRgn, dirtyRgn;
INT my = COMPLEXREGION;
+ DWORD dflags;
TRACE("\tnew wnd=(%i %i-%i %i) old wnd=(%i %i-%i %i), %04x\n",
Wnd->rectWindow.left, Wnd->rectWindow.top,
@@ -2259,7 +2260,11 @@
if( Wnd->hrgnUpdate == 1 )
uFlags |= SWP_EX_NOCOPY; /* whole window is invalid, nothing to copy */
- newVisRgn = DCE_GetVisRgn( Wnd->hwndSelf, DCX_WINDOW | DCX_CLIPSIBLINGS, 0, 0);
+ dflags = DCX_WINDOW;
+ if(Wnd->dwStyle & WS_CLIPSIBLINGS)
+ dflags |= DCX_CLIPSIBLINGS;
+ newVisRgn = DCE_GetVisRgn( Wnd->hwndSelf, dflags, 0, 0);
+
dirtyRgn = CreateRectRgn( 0, 0, 0, 0 );
if( !(uFlags & SWP_EX_NOCOPY) ) /* make sure dst region covers only valid bits */
@@ -2898,13 +2903,8 @@
else
{
if( (winpos.flags & SWP_AGG_NOPOSCHANGE) != SWP_AGG_NOPOSCHANGE )
- {
- /* if window was not resized and not moved try to repaint itself */
- if((winpos.flags & SWP_AGG_NOGEOMETRYCHANGE) == SWP_AGG_NOGEOMETRYCHANGE)
- uFlags |= SWP_EX_PAINTSELF;
uFlags = SWP_CopyValidBits(wndPtr, &visRgn, &oldWindowRect,
&oldClientRect, uFlags);
- }
else
{
/* nothing moved, redraw frame if needed */
More information about the wine-patches
mailing list