On 6 February 2010 10:29, Reece Dunn msclrhd@googlemail.com wrote:
On 6 February 2010 04:15, Dmitry Timoshkov dmitry@codeweavers.com wrote:
Reece Dunn msclrhd@googlemail.com wrote: Before fixing the problem we need to understand what exactly is the sequence of events that leads to it, how Windows and Wine behaviours differ.
I understand this.
Looking a bit deeper into the MDI tests, the MDI client window used in the tests has a size (0,0 - 0,0), whereas an MDI client in a real-world application has it covering the frame's client area.
That is...
----- 8< ----- diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c index 76fef3b..7c707e7 100644 --- a/dlls/user32/tests/msg.c +++ b/dlls/user32/tests/msg.c @@ -3359,6 +3359,7 @@ static void test_mdi_messages(void) CLIENTCREATESTRUCT client_cs; HWND mdi_frame, mdi_child, mdi_child2, active_child; BOOL zoomed; + RECT rc; HMENU hMenu = CreateMenu();
assert(mdi_RegisterWindowClasses()); @@ -3389,6 +3390,11 @@ static void test_mdi_messages(void) assert(mdi_client); ok_sequence(WmCreateMDIclientSeq, "Create visible MDI client window", FALSE);
+ GetClientRect(mdi_frame, &rc); + MoveWindow(mdi_client, rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top, TRUE); + /*MessageBoxA(NULL, "test", "test", MB_OK);*/ + flush_sequence(); + ok(GetActiveWindow() == mdi_frame, "wrong active window %p\n", GetActiveWindow()); ok(GetFocus() == mdi_frame, "input focus should be on MDI frame not on %p\n", GetFocus()); ----- >8 ------
which then fails some of the tests in Wine...
$ make msg.ok msg.c:3510: Test failed: ShowWindow(SW_MAXIMIZE):invisible MDI child: 19: in msg 0x0047 expecting wParam 0x9863 got 0x9062 msg.c:3532: Test failed: ShowWindow(SW_RESTORE):invisible MDI child: 5: in msg 0x0047 expecting wParam 0x9863 got 0x9062 msg.c:3556: Test failed: ShowWindow(SW_MAXIMIZE):MDI child: 5: in msg 0x0047 expecting wParam 0x9823 got 0x9022 msg.c:3562: Test failed: ShowWindow(SW_RESTORE):maximized MDI child: 4: in msg 0x0047 expecting wParam 0x9823 got 0x9022 msg.c:3719: Test failed: Create maximized invisible MDI child window: 17: in msg 0x0047 expecting wParam 0x8839 got 0x8038
... I am going to run this on the winetestbot to see how Windows behaves.
- Reece