Author: jimtabor
Date: Tue Feb 17 08:25:43 2015
New Revision: 66332
URL:
http://svn.reactos.org/svn/reactos?rev=66332&view=rev
Log:
[NtUser]
- Fix wine msg test_SetFocus tests. Use send message for WM_WINDOWPOSCHANGING. If nothing
has been drawn and the no position changed bits set, set no Z order and no redraw. See
CORE-7447.
Modified:
trunk/reactos/win32ss/user/ntuser/winpos.c
Modified: trunk/reactos/win32ss/user/ntuser/winpos.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/winpos…
==============================================================================
--- trunk/reactos/win32ss/user/ntuser/winpos.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/ntuser/winpos.c [iso-8859-1] Tue Feb 17 08:25:43 2015
@@ -17,9 +17,9 @@
#define SWP_EX_PAINTSELF 0x0002
#define SWP_AGG_NOGEOMETRYCHANGE \
- (SWP_NOSIZE | SWP_NOMOVE | SWP_NOCLIENTSIZE | SWP_NOCLIENTMOVE)
+ (SWP_NOSIZE | SWP_NOCLIENTSIZE | SWP_NOZORDER)
#define SWP_AGG_NOPOSCHANGE \
- (SWP_AGG_NOGEOMETRYCHANGE | SWP_NOZORDER)
+ (SWP_NOSIZE | SWP_NOMOVE | SWP_NOCLIENTSIZE | SWP_NOCLIENTMOVE | SWP_NOZORDER)
#define SWP_AGG_STATUSFLAGS \
(SWP_AGG_NOPOSCHANGE | SWP_FRAMECHANGED | SWP_HIDEWINDOW | SWP_SHOWWINDOW)
@@ -1287,7 +1287,7 @@
if (!(WinPos->flags & SWP_NOSENDCHANGING))
{
TRACE("Sending WM_WINDOWPOSCHANGING to hwnd %p.\n", Window->head.h);
- co_IntSendMessageNoWait(Window->head.h, WM_WINDOWPOSCHANGING, 0, (LPARAM)
WinPos);
+ co_IntSendMessage(Window->head.h, WM_WINDOWPOSCHANGING, 0, (LPARAM) WinPos);
}
/* Calculate new position and size */
@@ -1604,7 +1604,9 @@
WinPos->hwndInsertAfter = HWND_TOPMOST;
if (IntGetWindow(WinPos->hwnd, GW_HWNDFIRST) == WinPos->hwnd)
+ {
WinPos->flags |= SWP_NOZORDER;
+ }
}
else if (WinPos->hwndInsertAfter == HWND_BOTTOM)
{
@@ -2069,6 +2071,16 @@
}
}
+ // Fix wine msg test_SetFocus, prevents sending WM_WINDOWPOSCHANGED.
+ if ( VisBefore == NULL &&
+ VisBeforeJustClient == NULL &&
+ !(Window->ExStyle & WS_EX_TOPMOST) &&
+ (WinPos.flags & SWP_AGG_STATUSFLAGS) == (SWP_AGG_NOPOSCHANGE &
~SWP_NOZORDER))
+ {
+ TRACE("No drawing, set no Z order and no redraw!\n");
+ WinPos.flags |= SWP_NOZORDER|SWP_NOREDRAW;
+ }
+
/* And last, send the WM_WINDOWPOSCHANGED message */
TRACE("\tstatus flags = %04x\n", WinPos.flags & SWP_AGG_STATUSFLAGS);
@@ -2082,6 +2094,7 @@
WinPos.y = NewWindowRect.top;
WinPos.cx = NewWindowRect.right - NewWindowRect.left;
WinPos.cy = NewWindowRect.bottom - NewWindowRect.top;
+ TRACE("WM_WINDOWPOSCHANGED hwnd %p Flags
%04x\n",WinPos.hwnd,(WinPos.flags&SWP_AGG_STATUSFLAGS));
co_IntSendMessageNoWait(WinPos.hwnd, WM_WINDOWPOSCHANGED, 0, (LPARAM)
&WinPos);
}