mirror of
https://github.com/reactos/wine.git
synced 2024-11-26 13:10:28 +00:00
user32: SetWindowPos should erase the parent also for child moves.
This commit is contained in:
parent
effdfa7da4
commit
a887a64c17
@ -941,6 +941,7 @@ static const struct message WmDragThickBordersBarSeq[] = { /* FIXME: add */
|
||||
static const struct message WmResizingChildWithMoveWindowSeq[] = {
|
||||
{ WM_WINDOWPOSCHANGING, sent|wparam, SWP_NOACTIVATE },
|
||||
{ WM_NCCALCSIZE, sent|wparam, 1 },
|
||||
{ WM_ERASEBKGND, sent|parent|optional },
|
||||
{ WM_ERASEBKGND, sent|optional },
|
||||
{ WM_WINDOWPOSCHANGED, sent|wparam, SWP_NOACTIVATE },
|
||||
{ WM_MOVE, sent|defwinproc },
|
||||
@ -4020,8 +4021,10 @@ static void test_messages(void)
|
||||
/* test WM_SETREDRAW on a visible child window */
|
||||
test_WM_SETREDRAW(hchild);
|
||||
|
||||
log_all_parent_messages++;
|
||||
MoveWindow(hchild, 10, 10, 20, 20, TRUE);
|
||||
ok_sequence(WmResizingChildWithMoveWindowSeq, "MoveWindow:child", FALSE);
|
||||
log_all_parent_messages--;
|
||||
|
||||
ShowWindow(hchild, SW_HIDE);
|
||||
flush_sequence();
|
||||
|
@ -1604,19 +1604,15 @@ BOOL USER_SetWindowPos( WINDOWPOS * winpos )
|
||||
&newWindowRect, &newClientRect, orig_flags, valid_rects ))
|
||||
return FALSE;
|
||||
|
||||
/* erase parent if hiding child */
|
||||
if (!(orig_flags & SWP_DEFERERASE))
|
||||
/* erase parent when hiding or resizing child */
|
||||
if (!(orig_flags & SWP_DEFERERASE) &&
|
||||
((orig_flags & SWP_HIDEWINDOW) ||
|
||||
(!(orig_flags & SWP_SHOWWINDOW) &&
|
||||
(winpos->flags & SWP_AGG_STATUSFLAGS) != SWP_AGG_NOGEOMETRYCHANGE)))
|
||||
{
|
||||
if (orig_flags & SWP_HIDEWINDOW)
|
||||
{
|
||||
HWND parent = GetAncestor( winpos->hwnd, GA_PARENT );
|
||||
erase_now( parent, RDW_NOCHILDREN );
|
||||
}
|
||||
else if (!(orig_flags & SWP_SHOWWINDOW) &&
|
||||
(winpos->flags & SWP_AGG_STATUSFLAGS) != SWP_AGG_NOGEOMETRYCHANGE)
|
||||
{
|
||||
erase_now( winpos->hwnd, 0 );
|
||||
}
|
||||
HWND parent = GetAncestor( winpos->hwnd, GA_PARENT );
|
||||
if (!parent || parent == GetDesktopWindow()) parent = winpos->hwnd;
|
||||
erase_now( parent, 0 );
|
||||
}
|
||||
|
||||
if( winpos->flags & SWP_HIDEWINDOW )
|
||||
|
Loading…
Reference in New Issue
Block a user