Fix message tests to run cleanly on Windows XP SP1.
This commit is contained in:
parent
2a3c30a239
commit
0940654da7
|
@ -125,6 +125,7 @@ static const struct message WmSWP_ShowOverlappedSeq[] = {
|
|||
{ WM_NCCALCSIZE, sent|wparam|optional, 1 },
|
||||
{ WM_NCPAINT, sent|wparam|optional, 1 },
|
||||
{ WM_ERASEBKGND, sent|optional },
|
||||
{ EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 },
|
||||
{ 0 }
|
||||
};
|
||||
/* SetWindowPos(SWP_HIDEWINDOW|SWP_NOSIZE|SWP_NOMOVE)
|
||||
|
@ -154,6 +155,7 @@ static const struct message WmSWP_ResizeSeq[] = {
|
|||
{ WM_GETTEXT, sent|defwinproc|optional },
|
||||
{ WM_ERASEBKGND, sent|optional },
|
||||
{ EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 },
|
||||
{ EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam|optional, 0, 0 }, /* XP sends a duplicate */
|
||||
{ 0 }
|
||||
};
|
||||
|
||||
|
@ -203,6 +205,7 @@ static const struct message WmSWP_FrameChanged_clip[] = {
|
|||
{ WM_NCPAINT, sent }, /* wparam != 1 */
|
||||
{ WM_ERASEBKGND, sent },
|
||||
{ WM_WINDOWPOSCHANGED, sent|wparam|parent, SWP_NOSIZE|SWP_NOMOVE|SWP_NOACTIVATE|SWP_NOZORDER|SWP_FRAMECHANGED|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE },
|
||||
{ EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 },
|
||||
{ WM_PAINT, sent },
|
||||
{ 0 }
|
||||
};
|
||||
|
@ -214,6 +217,7 @@ static const struct message WmSWP_FrameChangedDeferErase[] = {
|
|||
{ WM_WINDOWPOSCHANGING, sent|wparam|parent, SWP_NOSIZE|SWP_NOMOVE|SWP_DEFERERASE|SWP_NOACTIVATE|SWP_NOZORDER|SWP_FRAMECHANGED },
|
||||
{ WM_NCCALCSIZE, sent|wparam|parent, 1 },
|
||||
{ WM_WINDOWPOSCHANGED, sent|wparam|parent, SWP_NOSIZE|SWP_NOMOVE|SWP_DEFERERASE|SWP_NOACTIVATE|SWP_NOZORDER|SWP_FRAMECHANGED|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE },
|
||||
{ EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 },
|
||||
{ WM_PAINT, sent|parent },
|
||||
{ WM_NCPAINT, sent|beginpaint|parent }, /* wparam != 1 */
|
||||
{ WM_GETTEXT, sent|beginpaint|parent|defwinproc|optional },
|
||||
|
@ -234,6 +238,7 @@ static const struct message WmSWP_FrameChanged_noclip[] = {
|
|||
{ WM_GETTEXT, sent|parent|defwinproc|optional },
|
||||
{ WM_ERASEBKGND, sent|parent|optional }, /* FIXME: remove optional once Wine is fixed */
|
||||
{ WM_WINDOWPOSCHANGED, sent|wparam|parent, SWP_NOSIZE|SWP_NOMOVE|SWP_NOACTIVATE|SWP_NOZORDER|SWP_FRAMECHANGED|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE },
|
||||
{ EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 },
|
||||
{ WM_PAINT, sent },
|
||||
{ WM_NCPAINT, sent|beginpaint }, /* wparam != 1 */
|
||||
{ WM_ERASEBKGND, sent|beginpaint },
|
||||
|
@ -320,8 +325,8 @@ static const struct message WmHideOverlappedSeq[] = {
|
|||
{ WM_WINDOWPOSCHANGING, sent|wparam, SWP_HIDEWINDOW|SWP_NOSIZE|SWP_NOMOVE },
|
||||
{ EVENT_OBJECT_HIDE, winevent_hook|wparam|lparam, 0, 0 },
|
||||
{ WM_WINDOWPOSCHANGED, sent|wparam, SWP_HIDEWINDOW|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE },
|
||||
{ WM_SIZE, sent },
|
||||
{ WM_MOVE, sent },
|
||||
{ WM_SIZE, sent|optional }, /* XP doesn't send it */
|
||||
{ WM_MOVE, sent|optional }, /* XP doesn't send it */
|
||||
{ WM_NCACTIVATE, sent|wparam, 0 },
|
||||
{ WM_ACTIVATE, sent|wparam, 0 },
|
||||
{ WM_ACTIVATEAPP, sent|wparam, 0 },
|
||||
|
@ -450,6 +455,7 @@ static const struct message WmCreateVisibleChildSeq[] = {
|
|||
{ WM_ERASEBKGND, sent|parent|optional },
|
||||
{ WM_WINDOWPOSCHANGED, sent|wparam, SWP_SHOWWINDOW|SWP_NOSIZE|SWP_NOMOVE|SWP_NOACTIVATE|SWP_NOZORDER|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE },
|
||||
{ WM_NCCALCSIZE, sent|wparam|optional, 1 }, /* WinXP */
|
||||
{ EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 },
|
||||
{ 0 }
|
||||
};
|
||||
/* ShowWindow(SW_SHOW) for a not visible child window */
|
||||
|
@ -548,6 +554,7 @@ static const struct message WmDestroyInvisibleChildSeq[] = {
|
|||
{ HCBT_DESTROYWND, hook },
|
||||
{ WM_PARENTNOTIFY, sent|parent|wparam, WM_DESTROY },
|
||||
{ WM_SHOWWINDOW, sent|wparam, 0 },
|
||||
{ EVENT_OBJECT_DESTROY, winevent_hook|wparam|lparam, 0, 0 },
|
||||
{ WM_DESTROY, sent },
|
||||
{ WM_NCDESTROY, sent },
|
||||
{ 0 }
|
||||
|
@ -703,6 +710,7 @@ static const struct message WmCreateCustomDialogSeq[] = {
|
|||
{ EVENT_OBJECT_DEFACTIONCHANGE, winevent_hook|wparam|lparam|optional, OBJID_CLIENT, 0 },
|
||||
{ EVENT_OBJECT_DEFACTIONCHANGE, winevent_hook|wparam|lparam|optional, OBJID_CLIENT, 0 },
|
||||
{ WM_GETTEXT, sent|optional|defwinproc },
|
||||
{ EVENT_OBJECT_DEFACTIONCHANGE, winevent_hook|wparam|lparam|optional, OBJID_CLIENT, 0 },
|
||||
{ WM_ERASEBKGND, sent },
|
||||
{ EVENT_OBJECT_DEFACTIONCHANGE, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 },
|
||||
{ WM_CTLCOLORDLG, sent|defwinproc },
|
||||
|
@ -726,9 +734,12 @@ static const struct message WmCreateCustomDialogSeq[] = {
|
|||
{ EVENT_OBJECT_DEFACTIONCHANGE, winevent_hook|wparam|lparam|optional, OBJID_CLIENT, 0 },
|
||||
{ EVENT_OBJECT_DEFACTIONCHANGE, winevent_hook|wparam|lparam|optional, OBJID_CLIENT, 0 },
|
||||
{ WM_GETTEXT, sent|optional|defwinproc },
|
||||
{ EVENT_OBJECT_DEFACTIONCHANGE, winevent_hook|wparam|lparam|optional, OBJID_CLIENT, 0 },
|
||||
{ WM_ERASEBKGND, sent|optional },
|
||||
{ EVENT_OBJECT_DEFACTIONCHANGE, winevent_hook|wparam|lparam|optional, OBJID_CLIENT, 0 },
|
||||
{ WM_CTLCOLORDLG, sent|optional|defwinproc },
|
||||
{ EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 },
|
||||
{ EVENT_OBJECT_DEFACTIONCHANGE, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 },
|
||||
{ WM_SIZE, sent },
|
||||
{ EVENT_OBJECT_DEFACTIONCHANGE, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 },
|
||||
{ WM_MOVE, sent },
|
||||
|
@ -837,6 +848,7 @@ static const struct message WmModalDialogSeq[] = {
|
|||
{ WM_GETTEXT, sent|optional },
|
||||
{ WM_ERASEBKGND, sent|optional },
|
||||
{ WM_CTLCOLORDLG, sent|optional },
|
||||
{ EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 },
|
||||
{ WM_PAINT, sent|optional },
|
||||
{ WM_CTLCOLORBTN, sent },
|
||||
{ WM_ENTERIDLE, sent|parent|optional },
|
||||
|
@ -920,7 +932,9 @@ static const struct message WmSetMenuNonVisibleSizeChangeSeq[] = {
|
|||
{ WM_WINDOWPOSCHANGED, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER|SWP_NOREDRAW },
|
||||
{ WM_MOVE, sent|defwinproc },
|
||||
{ WM_SIZE, sent|defwinproc },
|
||||
{ WM_NCCALCSIZE,sent|wparam|optional, 1 }, /* XP */
|
||||
{ EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 },
|
||||
{ EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam|optional, 0, 0 }, /* XP sends a duplicate */
|
||||
{ WM_GETTEXT, sent|optional },
|
||||
{ WM_NCCALCSIZE, sent|wparam|optional, 1 },
|
||||
{ 0 }
|
||||
|
@ -945,10 +959,11 @@ static const struct message WmSetMenuVisibleSizeChangeSeq[] = {
|
|||
{ WM_WINDOWPOSCHANGED, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER },
|
||||
{ WM_MOVE, sent|defwinproc },
|
||||
{ WM_SIZE, sent|defwinproc },
|
||||
{ EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 },
|
||||
{ WM_NCCALCSIZE, sent|wparam|optional, 1 },
|
||||
{ WM_NCPAINT, sent|optional }, /* wparam != 1 */
|
||||
{ WM_ERASEBKGND, sent|optional },
|
||||
{ EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 },
|
||||
{ EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam|optional, 0, 0 }, /* XP sends a duplicate */
|
||||
{ 0 }
|
||||
};
|
||||
/* SetMenu for Visible windows with no size change */
|
||||
|
@ -1040,6 +1055,7 @@ static const struct message WmSetScrollRangeHVSeq[] =
|
|||
{ WM_ERASEBKGND, sent|optional },
|
||||
{ WM_WINDOWPOSCHANGED, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOMOVE|SWP_NOSIZE|SWP_NOZORDER|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE },
|
||||
{ EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 },
|
||||
{ EVENT_OBJECT_VALUECHANGE, winevent_hook|lparam|optional, 0/*OBJID_HSCROLL or OBJID_VSCROLL*/, 0 },
|
||||
{ 0 }
|
||||
};
|
||||
/* SetScrollRange for a window with a non-client area */
|
||||
|
@ -1056,6 +1072,7 @@ static const struct message WmSetScrollRangeHV_NC_Seq[] =
|
|||
{ WM_WINDOWPOSCHANGED, sent, /*|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOMOVE|SWP_NOSIZE|SWP_NOZORDER|0x1000*/ },
|
||||
{ WM_SIZE, sent|defwinproc },
|
||||
{ EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 },
|
||||
{ EVENT_OBJECT_VALUECHANGE, winevent_hook|lparam|optional, 0/*OBJID_HSCROLL or OBJID_VSCROLL*/, 0 },
|
||||
{ WM_GETTEXT, sent|optional },
|
||||
{ WM_GETTEXT, sent|optional },
|
||||
{ WM_GETTEXT, sent|optional },
|
||||
|
@ -1101,6 +1118,7 @@ static const struct message WmSHOWNATopInvisible[] = {
|
|||
{ WM_NCCALCSIZE, sent|wparam|optional, 1 },
|
||||
{ WM_NCPAINT, sent|wparam|optional, 1 },
|
||||
{ WM_ERASEBKGND, sent|optional },
|
||||
{ EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 },
|
||||
{ WM_SIZE, sent },
|
||||
{ WM_MOVE, sent },
|
||||
{ 0 }
|
||||
|
@ -1282,6 +1300,8 @@ static const struct message WmCreateMDIframeSeq[] = {
|
|||
{ WM_SETFOCUS, sent|wparam|defwinproc, 0 },
|
||||
/* Win9x adds SWP_NOZORDER below */
|
||||
{ WM_WINDOWPOSCHANGED, sent, /*|wparam, SWP_SHOWWINDOW|SWP_NOSIZE|SWP_NOMOVE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE*/ },
|
||||
{ WM_NCCALCSIZE, sent|wparam|optional, 1 }, /* XP */
|
||||
{ EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 },
|
||||
{ WM_SIZE, sent },
|
||||
{ WM_MOVE, sent },
|
||||
{ 0 }
|
||||
|
@ -1692,7 +1712,9 @@ static const struct message WmCreateMDIchildVisibleMaxSeq3[] = {
|
|||
|
||||
{ EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, /* MDI child */
|
||||
{ EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, /* MDI client */
|
||||
{ WM_NCCALCSIZE, sent|wparam|optional, 1 }, /* XP sends it to MDI frame */
|
||||
{ EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, /* MDI frame */
|
||||
{ EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, /* XP sends a duplicate */
|
||||
|
||||
{ 0 }
|
||||
};
|
||||
|
@ -1859,10 +1881,14 @@ static const struct message WmDestroyMDIchildVisibleMaxSeq1[] = {
|
|||
{ WM_SIZE, sent|defwinproc },
|
||||
{ EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, /* MDI child */
|
||||
{ EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, /* MDI client */
|
||||
|
||||
{ WM_NCCALCSIZE, sent|wparam|defwinproc|optional, 1 }, /* XP sends it to MDI frame */
|
||||
|
||||
{ EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, /* MDI frame */
|
||||
{ EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, /* MDI child */
|
||||
{ EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, /* MDI client */
|
||||
{ EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, /* MDI frame */
|
||||
{ EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, /* XP sends a duplicate */
|
||||
|
||||
/* in MDI frame */
|
||||
{ WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER },
|
||||
|
@ -1902,8 +1928,10 @@ static const struct message WmDestroyMDIchildVisibleMaxSeq1[] = {
|
|||
{ WM_WINDOWPOSCHANGED, sent|wparam, SWP_NOACTIVATE|SWP_NOMOVE|SWP_NOZORDER|SWP_NOCLIENTMOVE },
|
||||
{ WM_SIZE, sent },
|
||||
{ EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, /* MDI child */
|
||||
{ WM_NCCALCSIZE, sent|wparam|optional, 1 }, /* XP */
|
||||
{ EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, /* MDI client */
|
||||
{ EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, /* MDI frame */
|
||||
{ EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, /* XP sends a duplicate */
|
||||
|
||||
{ HCBT_SETFOCUS, hook },
|
||||
{ WM_KILLFOCUS, sent },
|
||||
|
@ -2975,7 +3003,7 @@ static void test_messages(void)
|
|||
ok_sequence(WmShowOverlappedSeq, "ShowWindow(SW_SHOW):overlapped", TRUE);
|
||||
|
||||
ShowWindow(hwnd, SW_HIDE);
|
||||
ok_sequence(WmHideOverlappedSeq, "ShowWindow(SW_HIDE):overlapped", TRUE);
|
||||
ok_sequence(WmHideOverlappedSeq, "ShowWindow(SW_HIDE):overlapped", FALSE);
|
||||
|
||||
ShowWindow(hwnd, SW_SHOWMAXIMIZED);
|
||||
ok_sequence(WmShowMaxOverlappedSeq, "ShowWindow(SW_SHOWMAXIMIZED):overlapped", TRUE);
|
||||
|
@ -4277,6 +4305,8 @@ static const struct message WmAltVkN[] = {
|
|||
{ HCBT_SYSCOMMAND, hook },
|
||||
{ WM_ENTERMENULOOP, sent|defwinproc|wparam|lparam, 0, 0 },
|
||||
{ EVENT_SYSTEM_CAPTURESTART, winevent_hook|wparam|lparam, 0, 0 },
|
||||
{ 0x00AE, sent|defwinproc|optional }, /* XP */
|
||||
{ WM_GETTEXT, sent|defwinproc|optional }, /* XP */
|
||||
{ WM_INITMENU, sent|defwinproc },
|
||||
{ EVENT_SYSTEM_MENUSTART, winevent_hook|wparam|lparam, OBJID_SYSMENU, 0 },
|
||||
{ WM_MENUCHAR, sent|defwinproc|wparam, MAKEWPARAM('n',MF_SYSMENU) },
|
||||
|
@ -6226,11 +6256,13 @@ START_TEST(msg)
|
|||
|
||||
test_winevents();
|
||||
|
||||
/* Fix message sequences before removing 3 lines below */
|
||||
/* Fix message sequences before removing 4 lines below */
|
||||
#if 1
|
||||
ret = pUnhookWinEvent(hEvent_hook);
|
||||
ok( ret, "UnhookWinEvent error %ld\n", GetLastError());
|
||||
pUnhookWinEvent = 0;
|
||||
hEvent_hook = 0;
|
||||
#endif
|
||||
|
||||
test_scrollwindowex();
|
||||
test_messages();
|
||||
|
|
Loading…
Reference in New Issue