Commit 830b58c0 authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard

Add a windows events hook to the message test.

parent 89640827
...@@ -39,6 +39,8 @@ ...@@ -39,6 +39,8 @@
#define SWP_NOCLIENTSIZE 0x0800 #define SWP_NOCLIENTSIZE 0x0800
#define SWP_NOCLIENTMOVE 0x1000 #define SWP_NOCLIENTMOVE 0x1000
static HWINEVENTHOOK hEvent_hook;
/* /*
FIXME: add tests for these FIXME: add tests for these
Window Edge Styles (Win31/Win95/98 look), in order of precedence: Window Edge Styles (Win31/Win95/98 look), in order of precedence:
...@@ -58,7 +60,8 @@ typedef enum { ...@@ -58,7 +60,8 @@ typedef enum {
defwinproc=0x20, defwinproc=0x20,
beginpaint=0x40, beginpaint=0x40,
optional=0x80, optional=0x80,
hook=0x100 hook=0x100,
winevent_hook=0x200
} msg_flags_t; } msg_flags_t;
struct message { struct message {
...@@ -79,7 +82,9 @@ static const struct message WmCreateOverlappedSeq[] = { ...@@ -79,7 +82,9 @@ static const struct message WmCreateOverlappedSeq[] = {
{ WM_GETMINMAXINFO, sent }, { WM_GETMINMAXINFO, sent },
{ WM_NCCREATE, sent }, { WM_NCCREATE, sent },
{ WM_NCCALCSIZE, sent|wparam, 0 }, { WM_NCCALCSIZE, sent|wparam, 0 },
{ EVENT_OBJECT_REORDER, winevent_hook|wparam|lparam, 0, 0 },
{ WM_CREATE, sent }, { WM_CREATE, sent },
{ EVENT_OBJECT_CREATE, winevent_hook|wparam|lparam, 0, 0 },
{ 0 } { 0 }
}; };
/* SetWindowPos(SWP_SHOWWINDOW|SWP_NOSIZE|SWP_NOMOVE) /* SetWindowPos(SWP_SHOWWINDOW|SWP_NOSIZE|SWP_NOMOVE)
...@@ -87,10 +92,12 @@ static const struct message WmCreateOverlappedSeq[] = { ...@@ -87,10 +92,12 @@ static const struct message WmCreateOverlappedSeq[] = {
*/ */
static const struct message WmSWP_ShowOverlappedSeq[] = { static const struct message WmSWP_ShowOverlappedSeq[] = {
{ WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_NOSIZE|SWP_NOMOVE }, { WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_NOSIZE|SWP_NOMOVE },
{ EVENT_OBJECT_SHOW, winevent_hook|wparam|lparam, 0, 0 },
{ WM_NCPAINT, sent|wparam|optional, 1 }, { WM_NCPAINT, sent|wparam|optional, 1 },
{ WM_GETTEXT, sent|defwinproc|optional }, { WM_GETTEXT, sent|defwinproc|optional },
{ WM_ERASEBKGND, sent|optional }, { WM_ERASEBKGND, sent|optional },
{ HCBT_ACTIVATE, hook }, { HCBT_ACTIVATE, hook },
{ EVENT_SYSTEM_FOREGROUND, winevent_hook|wparam|lparam, 0, 0 },
{ WM_QUERYNEWPALETTE, sent|wparam|lparam|optional, 0, 0 }, { WM_QUERYNEWPALETTE, sent|wparam|lparam|optional, 0, 0 },
{ WM_WINDOWPOSCHANGING, sent|wparam|optional, SWP_NOSIZE|SWP_NOMOVE }, /* Win9x: SWP_NOSENDCHANGING */ { WM_WINDOWPOSCHANGING, sent|wparam|optional, SWP_NOSIZE|SWP_NOMOVE }, /* Win9x: SWP_NOSENDCHANGING */
{ WM_ACTIVATEAPP, sent|wparam, 1 }, { WM_ACTIVATEAPP, sent|wparam, 1 },
...@@ -100,6 +107,7 @@ static const struct message WmSWP_ShowOverlappedSeq[] = { ...@@ -100,6 +107,7 @@ static const struct message WmSWP_ShowOverlappedSeq[] = {
{ HCBT_SETFOCUS, hook }, { HCBT_SETFOCUS, hook },
{ WM_IME_SETCONTEXT, sent|wparam|defwinproc|optional, 1 }, { WM_IME_SETCONTEXT, sent|wparam|defwinproc|optional, 1 },
{ WM_IME_NOTIFY, sent|defwinproc|optional }, { WM_IME_NOTIFY, sent|defwinproc|optional },
{ EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 },
{ WM_SETFOCUS, sent|wparam|defwinproc, 0 }, { WM_SETFOCUS, sent|wparam|defwinproc, 0 },
{ WM_NCPAINT, sent|wparam|optional, 1 }, { WM_NCPAINT, sent|wparam|optional, 1 },
{ WM_GETTEXT, sent|defwinproc|optional }, { WM_GETTEXT, sent|defwinproc|optional },
...@@ -116,6 +124,7 @@ static const struct message WmSWP_ShowOverlappedSeq[] = { ...@@ -116,6 +124,7 @@ static const struct message WmSWP_ShowOverlappedSeq[] = {
*/ */
static const struct message WmSWP_HideOverlappedSeq[] = { static const struct message WmSWP_HideOverlappedSeq[] = {
{ WM_WINDOWPOSCHANGING, sent|wparam, SWP_HIDEWINDOW|SWP_NOSIZE|SWP_NOMOVE }, { 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_WINDOWPOSCHANGED, sent|wparam, SWP_HIDEWINDOW|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE },
{ 0 } { 0 }
}; };
...@@ -124,10 +133,12 @@ static const struct message WmShowOverlappedSeq[] = { ...@@ -124,10 +133,12 @@ static const struct message WmShowOverlappedSeq[] = {
{ WM_SHOWWINDOW, sent|wparam, 1 }, { WM_SHOWWINDOW, sent|wparam, 1 },
{ WM_NCPAINT, sent|wparam|optional, 1 }, { WM_NCPAINT, sent|wparam|optional, 1 },
{ WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_NOSIZE|SWP_NOMOVE }, { WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_NOSIZE|SWP_NOMOVE },
{ EVENT_OBJECT_SHOW, winevent_hook|wparam|lparam, 0, 0 },
{ WM_NCPAINT, sent|wparam|optional, 1 }, { WM_NCPAINT, sent|wparam|optional, 1 },
{ WM_GETTEXT, sent|defwinproc|optional }, { WM_GETTEXT, sent|defwinproc|optional },
{ WM_ERASEBKGND, sent|optional }, { WM_ERASEBKGND, sent|optional },
{ HCBT_ACTIVATE, hook }, { HCBT_ACTIVATE, hook },
{ EVENT_SYSTEM_FOREGROUND, winevent_hook|wparam|lparam, 0, 0 },
{ WM_QUERYNEWPALETTE, sent|wparam|lparam|optional, 0, 0 }, { WM_QUERYNEWPALETTE, sent|wparam|lparam|optional, 0, 0 },
{ WM_WINDOWPOSCHANGING, sent|wparam, SWP_NOSIZE|SWP_NOMOVE }, { WM_WINDOWPOSCHANGING, sent|wparam, SWP_NOSIZE|SWP_NOMOVE },
{ WM_ACTIVATEAPP, sent|wparam, 1 }, { WM_ACTIVATEAPP, sent|wparam, 1 },
...@@ -137,6 +148,7 @@ static const struct message WmShowOverlappedSeq[] = { ...@@ -137,6 +148,7 @@ static const struct message WmShowOverlappedSeq[] = {
{ HCBT_SETFOCUS, hook }, { HCBT_SETFOCUS, hook },
{ WM_IME_SETCONTEXT, sent|wparam|defwinproc|optional, 1 }, { WM_IME_SETCONTEXT, sent|wparam|defwinproc|optional, 1 },
{ WM_IME_NOTIFY, sent|defwinproc|optional }, { WM_IME_NOTIFY, sent|defwinproc|optional },
{ EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 },
{ WM_SETFOCUS, sent|wparam|defwinproc, 0 }, { WM_SETFOCUS, sent|wparam|defwinproc, 0 },
{ WM_NCPAINT, sent|wparam|optional, 1 }, { WM_NCPAINT, sent|wparam|optional, 1 },
{ WM_GETTEXT, sent|defwinproc|optional }, { WM_GETTEXT, sent|defwinproc|optional },
...@@ -159,6 +171,7 @@ static const struct message WmShowOverlappedSeq[] = { ...@@ -159,6 +171,7 @@ static const struct message WmShowOverlappedSeq[] = {
static const struct message WmHideOverlappedSeq[] = { static const struct message WmHideOverlappedSeq[] = {
{ WM_SHOWWINDOW, sent|wparam, 0 }, { WM_SHOWWINDOW, sent|wparam, 0 },
{ WM_WINDOWPOSCHANGING, sent|wparam, SWP_HIDEWINDOW|SWP_NOSIZE|SWP_NOMOVE }, { 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_WINDOWPOSCHANGED, sent|wparam, SWP_HIDEWINDOW|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE },
{ WM_SIZE, sent }, { WM_SIZE, sent },
{ WM_MOVE, sent }, { WM_MOVE, sent },
...@@ -178,6 +191,7 @@ static const struct message WmHideInvisibleOverlappedSeq[] = { ...@@ -178,6 +191,7 @@ static const struct message WmHideInvisibleOverlappedSeq[] = {
static const struct message WmDestroyOverlappedSeq[] = { static const struct message WmDestroyOverlappedSeq[] = {
{ HCBT_DESTROYWND, hook }, { HCBT_DESTROYWND, hook },
{ WM_WINDOWPOSCHANGING, sent|wparam, SWP_HIDEWINDOW|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER }, { WM_WINDOWPOSCHANGING, sent|wparam, SWP_HIDEWINDOW|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER },
{ EVENT_OBJECT_HIDE, winevent_hook|wparam|lparam, 0, 0 },
{ WM_WINDOWPOSCHANGED, sent|wparam, SWP_HIDEWINDOW|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, { WM_WINDOWPOSCHANGED, sent|wparam, SWP_HIDEWINDOW|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE },
{ WM_NCACTIVATE, sent|wparam, 0 }, { WM_NCACTIVATE, sent|wparam, 0 },
{ WM_ACTIVATE, sent|wparam, 0 }, { WM_ACTIVATE, sent|wparam, 0 },
...@@ -185,6 +199,7 @@ static const struct message WmDestroyOverlappedSeq[] = { ...@@ -185,6 +199,7 @@ static const struct message WmDestroyOverlappedSeq[] = {
{ WM_KILLFOCUS, sent|wparam, 0 }, { WM_KILLFOCUS, sent|wparam, 0 },
{ WM_IME_SETCONTEXT, sent|wparam|optional, 0 }, { WM_IME_SETCONTEXT, sent|wparam|optional, 0 },
{ WM_IME_NOTIFY, sent|optional|defwinproc }, { WM_IME_NOTIFY, sent|optional|defwinproc },
{ EVENT_OBJECT_DESTROY, winevent_hook|wparam|lparam, 0, 0 },
{ WM_DESTROY, sent }, { WM_DESTROY, sent },
{ WM_NCDESTROY, sent }, { WM_NCDESTROY, sent },
{ 0 } { 0 }
...@@ -195,6 +210,7 @@ static const struct message WmCreateChildPopupSeq[] = { ...@@ -195,6 +210,7 @@ static const struct message WmCreateChildPopupSeq[] = {
{ WM_NCCREATE, sent }, { WM_NCCREATE, sent },
{ WM_NCCALCSIZE, sent|wparam, 0 }, { WM_NCCALCSIZE, sent|wparam, 0 },
{ WM_CREATE, sent }, { WM_CREATE, sent },
{ EVENT_OBJECT_CREATE, winevent_hook|wparam|lparam, 0, 0 },
{ WM_SIZE, sent }, { WM_SIZE, sent },
{ WM_MOVE, sent }, { WM_MOVE, sent },
{ 0 } { 0 }
...@@ -209,6 +225,7 @@ static const struct message WmCreateInvisiblePopupSeq[] = { ...@@ -209,6 +225,7 @@ static const struct message WmCreateInvisiblePopupSeq[] = {
{ WM_CREATE, sent }, { WM_CREATE, sent },
{ WM_STYLECHANGING, sent }, { WM_STYLECHANGING, sent },
{ WM_STYLECHANGED, sent }, { WM_STYLECHANGED, sent },
{ EVENT_OBJECT_CREATE, winevent_hook|wparam|lparam, 0, 0 },
{ WM_SIZE, sent }, { WM_SIZE, sent },
{ WM_MOVE, sent }, { WM_MOVE, sent },
{ 0 } { 0 }
...@@ -226,6 +243,7 @@ static const struct message WmShowVisiblePopupSeq_2[] = { ...@@ -226,6 +243,7 @@ static const struct message WmShowVisiblePopupSeq_2[] = {
static const struct message WmShowVisiblePopupSeq_3[] = { static const struct message WmShowVisiblePopupSeq_3[] = {
{ WM_WINDOWPOSCHANGING, sent|wparam, 0 }, { WM_WINDOWPOSCHANGING, sent|wparam, 0 },
{ HCBT_ACTIVATE, hook }, { HCBT_ACTIVATE, hook },
{ EVENT_SYSTEM_FOREGROUND, winevent_hook|wparam|lparam, 0, 0 },
{ WM_QUERYNEWPALETTE, sent|wparam|lparam|optional, 0, 0 }, { WM_QUERYNEWPALETTE, sent|wparam|lparam|optional, 0, 0 },
{ WM_WINDOWPOSCHANGING, sent|wparam, 0 }, { WM_WINDOWPOSCHANGING, sent|wparam, 0 },
{ WM_NCACTIVATE, sent|wparam, 1 }, { WM_NCACTIVATE, sent|wparam, 1 },
...@@ -235,6 +253,7 @@ static const struct message WmShowVisiblePopupSeq_3[] = { ...@@ -235,6 +253,7 @@ static const struct message WmShowVisiblePopupSeq_3[] = {
{ WM_IME_SETCONTEXT, sent|parent|wparam|optional, 0 }, { WM_IME_SETCONTEXT, sent|parent|wparam|optional, 0 },
{ WM_IME_SETCONTEXT, sent|wparam|defwinproc|optional, 1 }, { WM_IME_SETCONTEXT, sent|wparam|defwinproc|optional, 1 },
{ WM_IME_NOTIFY, sent|defwinproc|optional }, { WM_IME_NOTIFY, sent|defwinproc|optional },
{ EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 },
{ WM_SETFOCUS, sent|defwinproc }, { WM_SETFOCUS, sent|defwinproc },
{ 0 } { 0 }
}; };
...@@ -245,6 +264,7 @@ static const struct message WmCreateChildSeq[] = { ...@@ -245,6 +264,7 @@ static const struct message WmCreateChildSeq[] = {
/* child is inserted into parent's child list after WM_NCCREATE returns */ /* child is inserted into parent's child list after WM_NCCREATE returns */
{ WM_NCCALCSIZE, sent|wparam, 0 }, { WM_NCCALCSIZE, sent|wparam, 0 },
{ WM_CREATE, sent }, { WM_CREATE, sent },
{ EVENT_OBJECT_CREATE, winevent_hook|wparam|lparam, 0, 0 },
{ WM_SIZE, sent }, { WM_SIZE, sent },
{ WM_MOVE, sent }, { WM_MOVE, sent },
{ WM_PARENTNOTIFY, sent|parent|wparam, WM_CREATE }, { WM_PARENTNOTIFY, sent|parent|wparam, WM_CREATE },
...@@ -256,6 +276,7 @@ static const struct message WmCreateMaximizedChildSeq[] = { ...@@ -256,6 +276,7 @@ static const struct message WmCreateMaximizedChildSeq[] = {
{ WM_NCCREATE, sent }, { WM_NCCREATE, sent },
{ WM_NCCALCSIZE, sent|wparam, 0 }, { WM_NCCALCSIZE, sent|wparam, 0 },
{ WM_CREATE, sent }, { WM_CREATE, sent },
{ EVENT_OBJECT_CREATE, winevent_hook|wparam|lparam, 0, 0 },
{ WM_SIZE, sent }, { WM_SIZE, sent },
{ WM_MOVE, sent }, { WM_MOVE, sent },
{ HCBT_MINMAX, hook|lparam, 0, SW_MAXIMIZE }, { HCBT_MINMAX, hook|lparam, 0, SW_MAXIMIZE },
...@@ -264,6 +285,7 @@ static const struct message WmCreateMaximizedChildSeq[] = { ...@@ -264,6 +285,7 @@ static const struct message WmCreateMaximizedChildSeq[] = {
{ WM_NCCALCSIZE, sent|wparam, 1 }, { WM_NCCALCSIZE, sent|wparam, 1 },
{ WM_WINDOWPOSCHANGED, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOMOVE|SWP_NOZORDER|SWP_NOREDRAW|SWP_NOCLIENTMOVE|0x8000 }, { WM_WINDOWPOSCHANGED, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOMOVE|SWP_NOZORDER|SWP_NOREDRAW|SWP_NOCLIENTMOVE|0x8000 },
{ WM_SIZE, sent|defwinproc }, { WM_SIZE, sent|defwinproc },
{ EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 },
{ WM_PARENTNOTIFY, sent|parent|wparam, WM_CREATE }, { WM_PARENTNOTIFY, sent|parent|wparam, WM_CREATE },
{ 0 } { 0 }
}; };
...@@ -273,12 +295,15 @@ static const struct message WmCreateVisibleChildSeq[] = { ...@@ -273,12 +295,15 @@ static const struct message WmCreateVisibleChildSeq[] = {
{ WM_NCCREATE, sent }, { WM_NCCREATE, sent },
/* child is inserted into parent's child list after WM_NCCREATE returns */ /* child is inserted into parent's child list after WM_NCCREATE returns */
{ WM_NCCALCSIZE, sent|wparam, 0 }, { WM_NCCALCSIZE, sent|wparam, 0 },
{ EVENT_OBJECT_REORDER, winevent_hook|wparam|lparam, 0, 0 },
{ WM_CREATE, sent }, { WM_CREATE, sent },
{ EVENT_OBJECT_CREATE, winevent_hook|wparam|lparam, 0, 0 },
{ WM_SIZE, sent }, { WM_SIZE, sent },
{ WM_MOVE, sent }, { WM_MOVE, sent },
{ WM_PARENTNOTIFY, sent|parent|wparam, WM_CREATE }, { WM_PARENTNOTIFY, sent|parent|wparam, WM_CREATE },
{ WM_SHOWWINDOW, sent|wparam, 1 }, { WM_SHOWWINDOW, sent|wparam, 1 },
{ WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_NOSIZE|SWP_NOMOVE|SWP_NOACTIVATE|SWP_NOZORDER }, { WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_NOSIZE|SWP_NOMOVE|SWP_NOACTIVATE|SWP_NOZORDER },
{ EVENT_OBJECT_SHOW, winevent_hook|wparam|lparam, 0, 0 },
{ WM_ERASEBKGND, sent|parent|optional }, { WM_ERASEBKGND, sent|parent|optional },
{ WM_WINDOWPOSCHANGED, sent|wparam, SWP_SHOWWINDOW|SWP_NOSIZE|SWP_NOMOVE|SWP_NOACTIVATE|SWP_NOZORDER|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, { WM_WINDOWPOSCHANGED, sent|wparam, SWP_SHOWWINDOW|SWP_NOSIZE|SWP_NOMOVE|SWP_NOACTIVATE|SWP_NOZORDER|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE },
{ 0 } { 0 }
...@@ -287,6 +312,7 @@ static const struct message WmCreateVisibleChildSeq[] = { ...@@ -287,6 +312,7 @@ static const struct message WmCreateVisibleChildSeq[] = {
static const struct message WmShowChildSeq[] = { static const struct message WmShowChildSeq[] = {
{ WM_SHOWWINDOW, sent|wparam, 1 }, { WM_SHOWWINDOW, sent|wparam, 1 },
{ WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER }, { WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER },
{ EVENT_OBJECT_SHOW, winevent_hook|wparam|lparam, 0, 0 },
{ WM_ERASEBKGND, sent|parent|optional }, { WM_ERASEBKGND, sent|parent|optional },
{ WM_WINDOWPOSCHANGED, sent|wparam, SWP_SHOWWINDOW|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, { WM_WINDOWPOSCHANGED, sent|wparam, SWP_SHOWWINDOW|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE },
{ 0 } { 0 }
...@@ -295,6 +321,7 @@ static const struct message WmShowChildSeq[] = { ...@@ -295,6 +321,7 @@ static const struct message WmShowChildSeq[] = {
static const struct message WmHideChildSeq[] = { static const struct message WmHideChildSeq[] = {
{ WM_SHOWWINDOW, sent|wparam, 0 }, { WM_SHOWWINDOW, sent|wparam, 0 },
{ WM_WINDOWPOSCHANGING, sent|wparam, SWP_HIDEWINDOW|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER }, { WM_WINDOWPOSCHANGING, sent|wparam, SWP_HIDEWINDOW|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER },
{ EVENT_OBJECT_HIDE, winevent_hook|wparam|lparam, 0, 0 },
{ WM_ERASEBKGND, sent|parent|optional }, { WM_ERASEBKGND, sent|parent|optional },
{ WM_WINDOWPOSCHANGED, sent|wparam, SWP_HIDEWINDOW|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, { WM_WINDOWPOSCHANGED, sent|wparam, SWP_HIDEWINDOW|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE },
{ 0 } { 0 }
...@@ -304,6 +331,7 @@ static const struct message WmHideChildSeq[] = { ...@@ -304,6 +331,7 @@ static const struct message WmHideChildSeq[] = {
*/ */
static const struct message WmShowChildSeq_2[] = { static const struct message WmShowChildSeq_2[] = {
{ WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_NOSIZE|SWP_NOMOVE }, { WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_NOSIZE|SWP_NOMOVE },
{ EVENT_OBJECT_SHOW, winevent_hook|wparam|lparam, 0, 0 },
{ WM_CHILDACTIVATE, sent }, { WM_CHILDACTIVATE, sent },
{ WM_WINDOWPOSCHANGED, sent|wparam, SWP_SHOWWINDOW|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, { WM_WINDOWPOSCHANGED, sent|wparam, SWP_SHOWWINDOW|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE },
{ 0 } { 0 }
...@@ -313,6 +341,7 @@ static const struct message WmShowChildSeq_2[] = { ...@@ -313,6 +341,7 @@ static const struct message WmShowChildSeq_2[] = {
*/ */
static const struct message WmShowChildSeq_3[] = { static const struct message WmShowChildSeq_3[] = {
{ WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_NOSIZE|SWP_NOMOVE|SWP_NOACTIVATE }, { WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_NOSIZE|SWP_NOMOVE|SWP_NOACTIVATE },
{ EVENT_OBJECT_SHOW, winevent_hook|wparam|lparam, 0, 0 },
{ WM_WINDOWPOSCHANGED, sent|wparam, SWP_SHOWWINDOW|SWP_NOSIZE|SWP_NOMOVE|SWP_NOACTIVATE|SWP_NOZORDER|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, { WM_WINDOWPOSCHANGED, sent|wparam, SWP_SHOWWINDOW|SWP_NOSIZE|SWP_NOMOVE|SWP_NOACTIVATE|SWP_NOZORDER|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE },
{ 0 } { 0 }
}; };
...@@ -337,12 +366,14 @@ static const struct message WmHideChildInvisibleParentSeq[] = { ...@@ -337,12 +366,14 @@ static const struct message WmHideChildInvisibleParentSeq[] = {
/* SetWindowPos(SWP_SHOWWINDOW) for child with invisible parent */ /* SetWindowPos(SWP_SHOWWINDOW) for child with invisible parent */
static const struct message WmShowChildInvisibleParentSeq_2[] = { static const struct message WmShowChildInvisibleParentSeq_2[] = {
{ WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_NOSIZE|SWP_NOMOVE|SWP_NOACTIVATE|SWP_NOZORDER }, { WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_NOSIZE|SWP_NOMOVE|SWP_NOACTIVATE|SWP_NOZORDER },
{ EVENT_OBJECT_SHOW, winevent_hook|wparam|lparam, 0, 0 },
{ WM_WINDOWPOSCHANGED, sent|wparam, SWP_SHOWWINDOW|SWP_NOSIZE|SWP_NOMOVE|SWP_NOACTIVATE|SWP_NOZORDER|SWP_NOREDRAW|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, { WM_WINDOWPOSCHANGED, sent|wparam, SWP_SHOWWINDOW|SWP_NOSIZE|SWP_NOMOVE|SWP_NOACTIVATE|SWP_NOZORDER|SWP_NOREDRAW|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE },
{ 0 } { 0 }
}; };
/* SetWindowPos(SWP_HIDEWINDOW) for child with invisible parent */ /* SetWindowPos(SWP_HIDEWINDOW) for child with invisible parent */
static const struct message WmHideChildInvisibleParentSeq_2[] = { static const struct message WmHideChildInvisibleParentSeq_2[] = {
{ WM_WINDOWPOSCHANGING, sent|wparam, SWP_HIDEWINDOW|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER }, { WM_WINDOWPOSCHANGING, sent|wparam, SWP_HIDEWINDOW|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER },
{ EVENT_OBJECT_HIDE, winevent_hook|wparam|lparam, 0, 0 },
{ WM_WINDOWPOSCHANGED, sent|wparam, SWP_HIDEWINDOW|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER|SWP_NOREDRAW|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, { WM_WINDOWPOSCHANGED, sent|wparam, SWP_HIDEWINDOW|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER|SWP_NOREDRAW|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE },
{ 0 } { 0 }
}; };
...@@ -352,17 +383,20 @@ static const struct message WmDestroyChildSeq[] = { ...@@ -352,17 +383,20 @@ static const struct message WmDestroyChildSeq[] = {
{ WM_PARENTNOTIFY, sent|parent|wparam, WM_DESTROY }, { WM_PARENTNOTIFY, sent|parent|wparam, WM_DESTROY },
{ WM_SHOWWINDOW, sent|wparam, 0 }, { WM_SHOWWINDOW, sent|wparam, 0 },
{ WM_WINDOWPOSCHANGING, sent|wparam, SWP_HIDEWINDOW|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER }, { WM_WINDOWPOSCHANGING, sent|wparam, SWP_HIDEWINDOW|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER },
{ EVENT_OBJECT_HIDE, winevent_hook|wparam|lparam, 0, 0 },
{ WM_ERASEBKGND, sent|parent|optional }, { WM_ERASEBKGND, sent|parent|optional },
{ WM_WINDOWPOSCHANGED, sent|wparam, SWP_HIDEWINDOW|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, { WM_WINDOWPOSCHANGED, sent|wparam, SWP_HIDEWINDOW|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE },
{ HCBT_SETFOCUS, hook }, /* set focus to a parent */ { HCBT_SETFOCUS, hook }, /* set focus to a parent */
{ WM_KILLFOCUS, sent }, { WM_KILLFOCUS, sent },
{ WM_IME_SETCONTEXT, sent|wparam|optional, 0 }, { WM_IME_SETCONTEXT, sent|wparam|optional, 0 },
{ WM_IME_SETCONTEXT, sent|wparam|parent|optional, 1 }, { WM_IME_SETCONTEXT, sent|wparam|parent|optional, 1 },
{ EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 },
{ WM_SETFOCUS, sent|parent }, { WM_SETFOCUS, sent|parent },
{ EVENT_OBJECT_DESTROY, winevent_hook|wparam|lparam, 0, 0 },
{ WM_DESTROY, sent }, { WM_DESTROY, sent },
{ WM_DESTROY, sent|optional }, /* a bug in win2k sp4 ? */ { WM_DESTROY, sent|optional }, /* some other (IME?) window */
{ WM_NCDESTROY, sent|optional }, /* some other (IME?) window */
{ WM_NCDESTROY, sent }, { WM_NCDESTROY, sent },
{ WM_NCDESTROY, sent|optional }, /* a bug in win2k sp4 ? */
{ 0 } { 0 }
}; };
/* Moving the mouse in nonclient area */ /* Moving the mouse in nonclient area */
...@@ -418,6 +452,7 @@ static const struct message WmResizingChildWithMoveWindowSeq[] = { ...@@ -418,6 +452,7 @@ static const struct message WmResizingChildWithMoveWindowSeq[] = {
{ WM_WINDOWPOSCHANGED, sent|wparam, SWP_NOACTIVATE|SWP_NOZORDER }, { WM_WINDOWPOSCHANGED, sent|wparam, SWP_NOACTIVATE|SWP_NOZORDER },
{ WM_MOVE, sent|defwinproc }, { WM_MOVE, sent|defwinproc },
{ WM_SIZE, sent|defwinproc }, { WM_SIZE, sent|defwinproc },
{ EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 },
{ 0 } { 0 }
}; };
/* Clicking on inactive button */ /* Clicking on inactive button */
...@@ -445,6 +480,7 @@ static const struct message WmClickInactiveButtonSeq[] = { /* FIXME: add */ ...@@ -445,6 +480,7 @@ static const struct message WmClickInactiveButtonSeq[] = { /* FIXME: add */
static const struct message WmReparentButtonSeq[] = { /* FIXME: add */ static const struct message WmReparentButtonSeq[] = { /* FIXME: add */
{ WM_SHOWWINDOW, sent|wparam, 0 }, { WM_SHOWWINDOW, sent|wparam, 0 },
{ WM_WINDOWPOSCHANGING, sent|wparam, SWP_HIDEWINDOW|SWP_NOACTIVATE|SWP_NOMOVE|SWP_NOSIZE|SWP_NOZORDER }, { WM_WINDOWPOSCHANGING, sent|wparam, SWP_HIDEWINDOW|SWP_NOACTIVATE|SWP_NOMOVE|SWP_NOSIZE|SWP_NOZORDER },
{ EVENT_OBJECT_HIDE, winevent_hook|wparam|lparam, 0, 0 },
{ WM_ERASEBKGND, sent|parent }, { WM_ERASEBKGND, sent|parent },
{ WM_WINDOWPOSCHANGED, sent|wparam, SWP_HIDEWINDOW|SWP_NOACTIVATE|SWP_NOMOVE|SWP_NOSIZE|SWP_NOZORDER }, { WM_WINDOWPOSCHANGED, sent|wparam, SWP_HIDEWINDOW|SWP_NOACTIVATE|SWP_NOMOVE|SWP_NOSIZE|SWP_NOZORDER },
{ WM_WINDOWPOSCHANGING, sent|wparam, SWP_NOSIZE|SWP_NOZORDER }, { WM_WINDOWPOSCHANGING, sent|wparam, SWP_NOSIZE|SWP_NOZORDER },
...@@ -457,59 +493,109 @@ static const struct message WmReparentButtonSeq[] = { /* FIXME: add */ ...@@ -457,59 +493,109 @@ static const struct message WmReparentButtonSeq[] = { /* FIXME: add */
/* Creation of a custom dialog (32) */ /* Creation of a custom dialog (32) */
static const struct message WmCreateCustomDialogSeq[] = { static const struct message WmCreateCustomDialogSeq[] = {
{ HCBT_CREATEWND, hook }, { HCBT_CREATEWND, hook },
{ EVENT_OBJECT_DEFACTIONCHANGE, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 },
{ WM_GETMINMAXINFO, sent }, { WM_GETMINMAXINFO, sent },
{ EVENT_OBJECT_DEFACTIONCHANGE, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 },
{ WM_NCCREATE, sent }, { WM_NCCREATE, sent },
{ EVENT_OBJECT_DEFACTIONCHANGE, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 },
{ WM_NCCALCSIZE, sent|wparam, 0 }, { WM_NCCALCSIZE, sent|wparam, 0 },
{ EVENT_OBJECT_REORDER, winevent_hook|wparam|lparam, 0, 0 },
{ EVENT_OBJECT_DEFACTIONCHANGE, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 },
{ WM_CREATE, sent }, { WM_CREATE, sent },
{ EVENT_OBJECT_CREATE, winevent_hook|wparam|lparam, 0, 0 },
{ EVENT_OBJECT_DEFACTIONCHANGE, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 },
{ WM_SHOWWINDOW, sent|wparam, 1 }, { WM_SHOWWINDOW, sent|wparam, 1 },
{ HCBT_ACTIVATE, hook }, { EVENT_OBJECT_DEFACTIONCHANGE, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 },
{ WM_QUERYNEWPALETTE, sent|wparam|lparam|optional, 0, 0 }, { WM_QUERYNEWPALETTE, sent|wparam|lparam|optional, 0, 0 },
{ WM_WINDOWPOSCHANGING, sent|wparam, 0 }, { EVENT_OBJECT_DEFACTIONCHANGE, winevent_hook|wparam|lparam|optional, OBJID_CLIENT, 0 },
{ WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_NOSIZE|SWP_NOMOVE },
{ EVENT_OBJECT_SHOW, winevent_hook|wparam|lparam, 0, 0 },
{ HCBT_ACTIVATE, hook },
{ EVENT_SYSTEM_FOREGROUND, winevent_hook|wparam|lparam, 0, 0 },
{ EVENT_OBJECT_DEFACTIONCHANGE, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 },
{ WM_WINDOWPOSCHANGING, sent|wparam, SWP_NOSIZE|SWP_NOMOVE },
{ EVENT_OBJECT_DEFACTIONCHANGE, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 },
{ WM_NCACTIVATE, sent|wparam, 1 }, { WM_NCACTIVATE, sent|wparam, 1 },
{ EVENT_OBJECT_DEFACTIONCHANGE, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 },
{ WM_GETTEXT, sent|optional|defwinproc }, { WM_GETTEXT, sent|optional|defwinproc },
{ EVENT_OBJECT_DEFACTIONCHANGE, winevent_hook|wparam|lparam|optional, OBJID_CLIENT, 0 },
{ WM_GETICON, sent|optional|defwinproc }, { WM_GETICON, sent|optional|defwinproc },
{ EVENT_OBJECT_DEFACTIONCHANGE, winevent_hook|wparam|lparam|optional, OBJID_CLIENT, 0 },
{ WM_GETICON, sent|optional|defwinproc }, { WM_GETICON, sent|optional|defwinproc },
{ EVENT_OBJECT_DEFACTIONCHANGE, winevent_hook|wparam|lparam|optional, OBJID_CLIENT, 0 },
{ WM_GETICON, sent|optional|defwinproc }, { WM_GETICON, sent|optional|defwinproc },
{ EVENT_OBJECT_DEFACTIONCHANGE, winevent_hook|wparam|lparam|optional, OBJID_CLIENT, 0 },
{ WM_GETTEXT, sent|optional|defwinproc }, { WM_GETTEXT, sent|optional|defwinproc },
{ EVENT_OBJECT_DEFACTIONCHANGE, winevent_hook|wparam|lparam|optional, OBJID_CLIENT, 0 },
{ WM_ACTIVATE, sent|wparam, 1 }, { WM_ACTIVATE, sent|wparam, 1 },
{ WM_KILLFOCUS, sent|parent }, { WM_KILLFOCUS, sent|parent },
{ EVENT_OBJECT_DEFACTIONCHANGE, winevent_hook|wparam|lparam|optional, OBJID_CLIENT, 0 },
{ WM_IME_SETCONTEXT, sent|parent|wparam|optional, 0 }, { WM_IME_SETCONTEXT, sent|parent|wparam|optional, 0 },
{ EVENT_OBJECT_DEFACTIONCHANGE, winevent_hook|wparam|lparam|optional, OBJID_CLIENT, 0 },
{ WM_IME_SETCONTEXT, sent|wparam|optional, 1 }, { WM_IME_SETCONTEXT, sent|wparam|optional, 1 },
{ EVENT_OBJECT_DEFACTIONCHANGE, winevent_hook|wparam|lparam|optional, OBJID_CLIENT, 0 },
{ WM_IME_NOTIFY, sent|optional|defwinproc }, { WM_IME_NOTIFY, sent|optional|defwinproc },
{ EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 },
{ EVENT_OBJECT_DEFACTIONCHANGE, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 },
{ WM_SETFOCUS, sent }, { WM_SETFOCUS, sent },
{ EVENT_OBJECT_DEFACTIONCHANGE, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 },
{ WM_GETDLGCODE, sent|defwinproc|wparam, 0 }, { WM_GETDLGCODE, sent|defwinproc|wparam, 0 },
{ WM_WINDOWPOSCHANGING, sent|wparam, 0 }, { EVENT_OBJECT_DEFACTIONCHANGE, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 },
{ WM_NCPAINT, sent|wparam, 1 }, { WM_NCPAINT, sent|wparam, 1 },
{ EVENT_OBJECT_DEFACTIONCHANGE, winevent_hook|wparam|lparam|optional, OBJID_CLIENT, 0 },
{ WM_GETTEXT, sent|optional|defwinproc }, { WM_GETTEXT, sent|optional|defwinproc },
{ EVENT_OBJECT_DEFACTIONCHANGE, winevent_hook|wparam|lparam|optional, OBJID_CLIENT, 0 },
{ WM_GETICON, sent|optional|defwinproc }, { WM_GETICON, sent|optional|defwinproc },
{ EVENT_OBJECT_DEFACTIONCHANGE, winevent_hook|wparam|lparam|optional, OBJID_CLIENT, 0 },
{ WM_GETICON, sent|optional|defwinproc }, { WM_GETICON, sent|optional|defwinproc },
{ EVENT_OBJECT_DEFACTIONCHANGE, winevent_hook|wparam|lparam|optional, OBJID_CLIENT, 0 },
{ WM_GETICON, sent|optional|defwinproc }, { WM_GETICON, sent|optional|defwinproc },
{ EVENT_OBJECT_DEFACTIONCHANGE, winevent_hook|wparam|lparam|optional, OBJID_CLIENT, 0 },
{ WM_GETTEXT, sent|optional|defwinproc }, { WM_GETTEXT, sent|optional|defwinproc },
{ WM_ERASEBKGND, sent }, { WM_ERASEBKGND, sent },
{ EVENT_OBJECT_DEFACTIONCHANGE, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 },
{ WM_CTLCOLORDLG, sent|defwinproc }, { WM_CTLCOLORDLG, sent|defwinproc },
{ WM_WINDOWPOSCHANGED, sent|wparam, 0 }, { EVENT_OBJECT_DEFACTIONCHANGE, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 },
{ WM_WINDOWPOSCHANGED, sent|wparam, SWP_SHOWWINDOW|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE },
{ EVENT_OBJECT_DEFACTIONCHANGE, winevent_hook|wparam|lparam|optional, OBJID_CLIENT, 0 },
{ WM_GETTEXT, sent|optional }, { WM_GETTEXT, sent|optional },
{ EVENT_OBJECT_DEFACTIONCHANGE, winevent_hook|wparam|lparam|optional, OBJID_CLIENT, 0 },
{ WM_GETICON, sent|optional }, { WM_GETICON, sent|optional },
{ EVENT_OBJECT_DEFACTIONCHANGE, winevent_hook|wparam|lparam|optional, OBJID_CLIENT, 0 },
{ WM_GETICON, sent|optional }, { WM_GETICON, sent|optional },
{ EVENT_OBJECT_DEFACTIONCHANGE, winevent_hook|wparam|lparam|optional, OBJID_CLIENT, 0 },
{ WM_GETICON, sent|optional }, { WM_GETICON, sent|optional },
{ EVENT_OBJECT_DEFACTIONCHANGE, winevent_hook|wparam|lparam|optional, OBJID_CLIENT, 0 },
{ WM_GETTEXT, sent|optional }, { WM_GETTEXT, sent|optional },
{ EVENT_OBJECT_DEFACTIONCHANGE, winevent_hook|wparam|lparam|optional, OBJID_CLIENT, 0 },
{ WM_NCCALCSIZE, sent|optional }, { WM_NCCALCSIZE, sent|optional },
{ EVENT_OBJECT_DEFACTIONCHANGE, winevent_hook|wparam|lparam|optional, OBJID_CLIENT, 0 },
{ WM_NCPAINT, sent|optional }, { WM_NCPAINT, sent|optional },
{ EVENT_OBJECT_DEFACTIONCHANGE, winevent_hook|wparam|lparam|optional, OBJID_CLIENT, 0 },
{ WM_GETTEXT, sent|optional|defwinproc }, { WM_GETTEXT, sent|optional|defwinproc },
{ EVENT_OBJECT_DEFACTIONCHANGE, winevent_hook|wparam|lparam|optional, OBJID_CLIENT, 0 },
{ WM_GETICON, sent|optional|defwinproc }, { WM_GETICON, sent|optional|defwinproc },
{ EVENT_OBJECT_DEFACTIONCHANGE, winevent_hook|wparam|lparam|optional, OBJID_CLIENT, 0 },
{ WM_GETICON, sent|optional|defwinproc }, { WM_GETICON, sent|optional|defwinproc },
{ EVENT_OBJECT_DEFACTIONCHANGE, winevent_hook|wparam|lparam|optional, OBJID_CLIENT, 0 },
{ WM_GETICON, sent|optional|defwinproc }, { WM_GETICON, sent|optional|defwinproc },
{ EVENT_OBJECT_DEFACTIONCHANGE, winevent_hook|wparam|lparam|optional, OBJID_CLIENT, 0 },
{ WM_GETTEXT, sent|optional|defwinproc }, { WM_GETTEXT, sent|optional|defwinproc },
{ WM_ERASEBKGND, sent|optional }, { WM_ERASEBKGND, sent|optional },
{ EVENT_OBJECT_DEFACTIONCHANGE, winevent_hook|wparam|lparam|optional, OBJID_CLIENT, 0 },
{ WM_CTLCOLORDLG, sent|optional|defwinproc }, { WM_CTLCOLORDLG, sent|optional|defwinproc },
{ WM_SIZE, sent }, { WM_SIZE, sent },
{ EVENT_OBJECT_DEFACTIONCHANGE, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 },
{ WM_MOVE, sent }, { WM_MOVE, sent },
{ 0 } { 0 }
}; };
/* Calling EndDialog for a custom dialog (32) */ /* Calling EndDialog for a custom dialog (32) */
static const struct message WmEndCustomDialogSeq[] = { static const struct message WmEndCustomDialogSeq[] = {
{ WM_WINDOWPOSCHANGING, sent|wparam, 0 }, { WM_WINDOWPOSCHANGING, sent|wparam, SWP_HIDEWINDOW|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER },
{ WM_WINDOWPOSCHANGED, sent|wparam, 0 }, { EVENT_OBJECT_HIDE, winevent_hook|wparam|lparam, 0, 0 },
{ WM_WINDOWPOSCHANGED, sent|wparam, SWP_HIDEWINDOW|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE },
{ WM_GETTEXT, sent|optional }, { WM_GETTEXT, sent|optional },
{ WM_GETICON, sent|optional }, { WM_GETICON, sent|optional },
{ WM_GETICON, sent|optional }, { WM_GETICON, sent|optional },
...@@ -522,36 +608,86 @@ static const struct message WmEndCustomDialogSeq[] = { ...@@ -522,36 +608,86 @@ static const struct message WmEndCustomDialogSeq[] = {
{ WM_GETICON, sent|optional|defwinproc }, { WM_GETICON, sent|optional|defwinproc },
{ WM_GETTEXT, sent|optional|defwinproc }, { WM_GETTEXT, sent|optional|defwinproc },
{ WM_ACTIVATE, sent|wparam, 0 }, { WM_ACTIVATE, sent|wparam, 0 },
{ WM_WINDOWPOSCHANGING, sent|wparam|optional, 0 }, { EVENT_SYSTEM_FOREGROUND, winevent_hook|wparam|lparam, 0, 0 },
{ WM_WINDOWPOSCHANGING, sent|wparam|optional, SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE },
{ HCBT_SETFOCUS, hook }, { HCBT_SETFOCUS, hook },
{ WM_KILLFOCUS, sent }, { WM_KILLFOCUS, sent },
{ WM_IME_SETCONTEXT, sent|wparam|optional, 0 }, { WM_IME_SETCONTEXT, sent|wparam|optional, 0 },
{ WM_IME_SETCONTEXT, sent|parent|wparam|defwinproc|optional, 1 }, { WM_IME_SETCONTEXT, sent|parent|wparam|defwinproc|optional, 1 },
{ WM_IME_NOTIFY, sent|optional }, { WM_IME_NOTIFY, sent|optional },
{ EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 },
{ WM_SETFOCUS, sent|parent|defwinproc }, { WM_SETFOCUS, sent|parent|defwinproc },
{ 0 } { 0 }
}; };
/* ShowWindow(SW_SHOW) for a custom dialog (initially invisible) */
static const struct message WmShowCustomDialogSeq[] = {
{ EVENT_OBJECT_DEFACTIONCHANGE, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 },
{ WM_SHOWWINDOW, sent|wparam, 1 },
{ EVENT_OBJECT_DEFACTIONCHANGE, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 },
{ WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_NOSIZE|SWP_NOMOVE },
{ EVENT_OBJECT_SHOW, winevent_hook|wparam|lparam, 0, 0 },
{ HCBT_ACTIVATE, hook },
{ EVENT_SYSTEM_FOREGROUND, winevent_hook|wparam|lparam, 0, 0 },
{ WM_QUERYNEWPALETTE, sent|wparam|lparam|optional, 0, 0 },
{ EVENT_OBJECT_DEFACTIONCHANGE, winevent_hook|wparam|lparam|optional, OBJID_CLIENT, 0 },
{ WM_WINDOWPOSCHANGING, sent|wparam, SWP_NOSIZE|SWP_NOMOVE },
{ EVENT_OBJECT_DEFACTIONCHANGE, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 },
{ WM_ACTIVATEAPP, sent|wparam|optional, 1 },
{ EVENT_OBJECT_DEFACTIONCHANGE, winevent_hook|wparam|lparam|optional, OBJID_CLIENT, 0 },
{ WM_NCACTIVATE, sent|wparam, 1 },
{ EVENT_OBJECT_DEFACTIONCHANGE, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 },
{ WM_ACTIVATE, sent|wparam, 1 },
{ WM_KILLFOCUS, sent|parent },
{ WM_IME_SETCONTEXT, sent|parent|wparam|optional, 0 },
{ EVENT_OBJECT_DEFACTIONCHANGE, winevent_hook|wparam|lparam|optional, OBJID_CLIENT, 0 },
{ WM_IME_SETCONTEXT, sent|wparam|optional, 1 },
{ EVENT_OBJECT_DEFACTIONCHANGE, winevent_hook|wparam|lparam|optional, OBJID_CLIENT, 0 },
{ WM_IME_NOTIFY, sent|optional|defwinproc },
{ EVENT_OBJECT_DEFACTIONCHANGE, winevent_hook|wparam|lparam|optional, OBJID_CLIENT, 0 },
{ EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 },
{ EVENT_OBJECT_DEFACTIONCHANGE, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 },
{ WM_SETFOCUS, sent },
{ EVENT_OBJECT_DEFACTIONCHANGE, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 },
{ WM_GETDLGCODE, sent|defwinproc|wparam, 0 },
{ EVENT_OBJECT_DEFACTIONCHANGE, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 },
{ WM_NCPAINT, sent|wparam, 1 },
{ EVENT_OBJECT_DEFACTIONCHANGE, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 },
{ WM_ERASEBKGND, sent },
{ EVENT_OBJECT_DEFACTIONCHANGE, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 },
{ WM_CTLCOLORDLG, sent|defwinproc },
{ EVENT_OBJECT_DEFACTIONCHANGE, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 },
{ WM_WINDOWPOSCHANGED, sent|wparam, SWP_SHOWWINDOW|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE },
{ 0 }
};
/* Creation and destruction of a modal dialog (32) */ /* Creation and destruction of a modal dialog (32) */
static const struct message WmModalDialogSeq[] = { static const struct message WmModalDialogSeq[] = {
{ WM_CANCELMODE, sent|parent }, { WM_CANCELMODE, sent|parent },
{ HCBT_SETFOCUS, hook }, { HCBT_SETFOCUS, hook },
{ EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 },
{ WM_KILLFOCUS, sent|parent }, { WM_KILLFOCUS, sent|parent },
{ WM_IME_SETCONTEXT, sent|parent|wparam|optional, 0 }, { WM_IME_SETCONTEXT, sent|parent|wparam|optional, 0 },
{ EVENT_OBJECT_STATECHANGE, winevent_hook|wparam|lparam, 0, 0 },
{ WM_ENABLE, sent|parent|wparam, 0 }, { WM_ENABLE, sent|parent|wparam, 0 },
{ HCBT_CREATEWND, hook }, { HCBT_CREATEWND, hook },
{ EVENT_OBJECT_REORDER, winevent_hook|wparam|lparam, 0, 0 },
{ EVENT_OBJECT_CREATE, winevent_hook|wparam|lparam, 0, 0 },
{ WM_SETFONT, sent }, { WM_SETFONT, sent },
{ WM_INITDIALOG, sent }, { WM_INITDIALOG, sent },
{ WM_CHANGEUISTATE, sent|optional }, { WM_CHANGEUISTATE, sent|optional },
{ WM_SHOWWINDOW, sent }, { WM_SHOWWINDOW, sent },
{ HCBT_ACTIVATE, hook }, { HCBT_ACTIVATE, hook },
{ WM_WINDOWPOSCHANGING, sent|wparam, 0 }, { EVENT_SYSTEM_FOREGROUND, winevent_hook|wparam|lparam, 0, 0 },
{ WM_WINDOWPOSCHANGING, sent|wparam, SWP_NOSIZE|SWP_NOMOVE },
{ WM_NCACTIVATE, sent|wparam, 1 }, { WM_NCACTIVATE, sent|wparam, 1 },
{ WM_GETICON, sent|optional }, { WM_GETICON, sent|optional },
{ WM_GETICON, sent|optional }, { WM_GETICON, sent|optional },
{ WM_GETICON, sent|optional }, { WM_GETICON, sent|optional },
{ WM_GETTEXT, sent|optional }, { WM_GETTEXT, sent|optional },
{ WM_ACTIVATE, sent|wparam, 1 }, { WM_ACTIVATE, sent|wparam, 1 },
{ WM_WINDOWPOSCHANGING, sent|wparam, 0 }, { WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER|SWP_NOACTIVATE },
{ EVENT_OBJECT_SHOW, winevent_hook|wparam|lparam, 0, 0 },
{ WM_NCPAINT, sent }, { WM_NCPAINT, sent },
{ WM_GETICON, sent|optional }, { WM_GETICON, sent|optional },
{ WM_GETICON, sent|optional }, { WM_GETICON, sent|optional },
...@@ -559,7 +695,7 @@ static const struct message WmModalDialogSeq[] = { ...@@ -559,7 +695,7 @@ static const struct message WmModalDialogSeq[] = {
{ WM_GETTEXT, sent|optional }, { WM_GETTEXT, sent|optional },
{ WM_ERASEBKGND, sent }, { WM_ERASEBKGND, sent },
{ WM_CTLCOLORDLG, sent }, { WM_CTLCOLORDLG, sent },
{ WM_WINDOWPOSCHANGED, sent|wparam, 0 }, { WM_WINDOWPOSCHANGED, sent|wparam, SWP_SHOWWINDOW|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER|SWP_NOACTIVATE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE },
{ WM_GETICON, sent|optional }, { WM_GETICON, sent|optional },
{ WM_GETICON, sent|optional }, { WM_GETICON, sent|optional },
{ WM_GETICON, sent|optional }, { WM_GETICON, sent|optional },
...@@ -576,9 +712,11 @@ static const struct message WmModalDialogSeq[] = { ...@@ -576,9 +712,11 @@ static const struct message WmModalDialogSeq[] = {
{ WM_CTLCOLORBTN, sent }, { WM_CTLCOLORBTN, sent },
{ WM_ENTERIDLE, sent|parent|optional }, { WM_ENTERIDLE, sent|parent|optional },
{ WM_TIMER, sent }, { WM_TIMER, sent },
{ EVENT_OBJECT_STATECHANGE, winevent_hook|wparam|lparam, 0, 0 },
{ WM_ENABLE, sent|parent|wparam, 1 }, { WM_ENABLE, sent|parent|wparam, 1 },
{ WM_WINDOWPOSCHANGING, sent|wparam, 0 }, { WM_WINDOWPOSCHANGING, sent|wparam, SWP_HIDEWINDOW|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER|SWP_NOACTIVATE },
{ WM_WINDOWPOSCHANGED, sent|wparam, 0 }, { EVENT_OBJECT_HIDE, winevent_hook|wparam|lparam, 0, 0 },
{ WM_WINDOWPOSCHANGED, sent|wparam, SWP_HIDEWINDOW|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER|SWP_NOACTIVATE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE },
{ WM_GETICON, sent|optional }, { WM_GETICON, sent|optional },
{ WM_GETICON, sent|optional }, { WM_GETICON, sent|optional },
{ WM_GETICON, sent|optional }, { WM_GETICON, sent|optional },
...@@ -590,11 +728,15 @@ static const struct message WmModalDialogSeq[] = { ...@@ -590,11 +728,15 @@ static const struct message WmModalDialogSeq[] = {
{ WM_GETICON, sent|optional }, { WM_GETICON, sent|optional },
{ WM_GETTEXT, sent|optional }, { WM_GETTEXT, sent|optional },
{ WM_ACTIVATE, sent|wparam, 0 }, { WM_ACTIVATE, sent|wparam, 0 },
{ EVENT_SYSTEM_FOREGROUND, winevent_hook|wparam|lparam, 0, 0 },
{ WM_WINDOWPOSCHANGING, sent|optional }, { WM_WINDOWPOSCHANGING, sent|optional },
{ HCBT_SETFOCUS, hook }, { HCBT_SETFOCUS, hook },
{ WM_IME_SETCONTEXT, sent|parent|wparam|defwinproc|optional, 1 }, { WM_IME_SETCONTEXT, sent|parent|wparam|defwinproc|optional, 1 },
{ EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 },
{ WM_SETFOCUS, sent|parent|defwinproc }, { WM_SETFOCUS, sent|parent|defwinproc },
{ EVENT_SYSTEM_DIALOGEND, winevent_hook|wparam|lparam, 0, 0 },
{ HCBT_DESTROYWND, hook }, { HCBT_DESTROYWND, hook },
{ EVENT_OBJECT_DESTROY, winevent_hook|wparam|lparam, 0, 0 },
{ WM_DESTROY, sent }, { WM_DESTROY, sent },
{ WM_NCDESTROY, sent }, { WM_NCDESTROY, sent },
{ 0 } { 0 }
...@@ -632,9 +774,11 @@ static const struct message WmCreateModalDialogResizeSeq[] = { /* FIXME: add */ ...@@ -632,9 +774,11 @@ static const struct message WmCreateModalDialogResizeSeq[] = { /* FIXME: add */
static const struct message WmSetMenuNonVisibleSizeChangeSeq[] = { static const struct message WmSetMenuNonVisibleSizeChangeSeq[] = {
{ WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER }, { WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER },
{ WM_NCCALCSIZE, sent|wparam, 1 }, { WM_NCCALCSIZE, sent|wparam, 1 },
{ EVENT_OBJECT_REORDER, winevent_hook|wparam|lparam, 0, 0 },
{ WM_WINDOWPOSCHANGED, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER|SWP_NOREDRAW }, { WM_WINDOWPOSCHANGED, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER|SWP_NOREDRAW },
{ WM_MOVE, sent|defwinproc }, { WM_MOVE, sent|defwinproc },
{ WM_SIZE, sent|defwinproc }, { WM_SIZE, sent|defwinproc },
{ EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 },
{ WM_GETICON, sent|optional }, { WM_GETICON, sent|optional },
{ WM_GETICON, sent|optional }, { WM_GETICON, sent|optional },
{ WM_GETICON, sent|optional }, { WM_GETICON, sent|optional },
...@@ -647,12 +791,14 @@ static const struct message WmSetMenuNonVisibleNoSizeChangeSeq[] = { ...@@ -647,12 +791,14 @@ static const struct message WmSetMenuNonVisibleNoSizeChangeSeq[] = {
{ WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER }, { WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER },
{ WM_NCCALCSIZE, sent|wparam, 1 }, { WM_NCCALCSIZE, sent|wparam, 1 },
{ WM_WINDOWPOSCHANGED, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER|SWP_NOREDRAW|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, { WM_WINDOWPOSCHANGED, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER|SWP_NOREDRAW|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE },
{ EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 },
{ 0 } { 0 }
}; };
/* SetMenu for Visible windows with size change */ /* SetMenu for Visible windows with size change */
static const struct message WmSetMenuVisibleSizeChangeSeq[] = { static const struct message WmSetMenuVisibleSizeChangeSeq[] = {
{ WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER }, { WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER },
{ WM_NCCALCSIZE, sent|wparam, 1 }, { WM_NCCALCSIZE, sent|wparam, 1 },
{ EVENT_OBJECT_REORDER, winevent_hook|wparam|lparam, 0, 0 },
{ WM_NCPAINT, sent|wparam, 1 }, { WM_NCPAINT, sent|wparam, 1 },
{ WM_GETTEXT, sent|defwinproc|optional }, { WM_GETTEXT, sent|defwinproc|optional },
{ WM_ERASEBKGND, sent|optional }, { WM_ERASEBKGND, sent|optional },
...@@ -660,6 +806,7 @@ static const struct message WmSetMenuVisibleSizeChangeSeq[] = { ...@@ -660,6 +806,7 @@ static const struct message WmSetMenuVisibleSizeChangeSeq[] = {
{ WM_WINDOWPOSCHANGED, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER }, { WM_WINDOWPOSCHANGED, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER },
{ WM_MOVE, sent|defwinproc }, { WM_MOVE, sent|defwinproc },
{ WM_SIZE, sent|defwinproc }, { WM_SIZE, sent|defwinproc },
{ EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 },
{ WM_NCCALCSIZE, sent|wparam|optional, 1 }, { WM_NCCALCSIZE, sent|wparam|optional, 1 },
{ WM_NCPAINT, sent|wparam|optional, 1 }, { WM_NCPAINT, sent|wparam|optional, 1 },
{ WM_ERASEBKGND, sent|optional }, { WM_ERASEBKGND, sent|optional },
...@@ -674,6 +821,7 @@ static const struct message WmSetMenuVisibleNoSizeChangeSeq[] = { ...@@ -674,6 +821,7 @@ static const struct message WmSetMenuVisibleNoSizeChangeSeq[] = {
{ WM_ERASEBKGND, sent|optional }, { WM_ERASEBKGND, sent|optional },
{ WM_ACTIVATE, sent|optional }, { WM_ACTIVATE, sent|optional },
{ WM_WINDOWPOSCHANGED, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, { WM_WINDOWPOSCHANGED, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE },
{ EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 },
{ 0 } { 0 }
}; };
/* DrawMenuBar for a visible window */ /* DrawMenuBar for a visible window */
...@@ -685,6 +833,7 @@ static const struct message WmDrawMenuBarSeq[] = ...@@ -685,6 +833,7 @@ static const struct message WmDrawMenuBarSeq[] =
{ WM_GETTEXT, sent|defwinproc|optional }, { WM_GETTEXT, sent|defwinproc|optional },
{ WM_ERASEBKGND, sent|optional }, { WM_ERASEBKGND, sent|optional },
{ WM_WINDOWPOSCHANGED, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, { WM_WINDOWPOSCHANGED, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE },
{ EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 },
{ 0 } { 0 }
}; };
...@@ -703,6 +852,7 @@ static const struct message WmSetRedrawTrueSeq[] = ...@@ -703,6 +852,7 @@ static const struct message WmSetRedrawTrueSeq[] =
static const struct message WmEnableWindowSeq[] = static const struct message WmEnableWindowSeq[] =
{ {
{ WM_CANCELMODE, sent }, { WM_CANCELMODE, sent },
{ EVENT_OBJECT_STATECHANGE, winevent_hook|wparam|lparam, 0, 0 },
{ WM_ENABLE, sent }, { WM_ENABLE, sent },
{ 0 } { 0 }
}; };
...@@ -726,6 +876,16 @@ static const struct message WmSetScrollRangeSeq[] = ...@@ -726,6 +876,16 @@ static const struct message WmSetScrollRangeSeq[] =
{ 0 } { 0 }
}; };
/* SetScrollRange for a window without a non-client area */ /* SetScrollRange for a window without a non-client area */
static const struct message WmSetScrollRangeHSeq_empty[] =
{
{ EVENT_OBJECT_VALUECHANGE, winevent_hook|wparam|lparam, OBJID_HSCROLL, 0 },
{ 0 }
};
static const struct message WmSetScrollRangeVSeq_empty[] =
{
{ EVENT_OBJECT_VALUECHANGE, winevent_hook|wparam|lparam, OBJID_VSCROLL, 0 },
{ 0 }
};
static const struct message WmSetScrollRangeHVSeq[] = static const struct message WmSetScrollRangeHVSeq[] =
{ {
{ WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOMOVE|SWP_NOSIZE|SWP_NOZORDER }, { WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOMOVE|SWP_NOSIZE|SWP_NOZORDER },
...@@ -733,6 +893,7 @@ static const struct message WmSetScrollRangeHVSeq[] = ...@@ -733,6 +893,7 @@ static const struct message WmSetScrollRangeHVSeq[] =
{ WM_GETTEXT, sent|defwinproc|optional }, { WM_GETTEXT, sent|defwinproc|optional },
{ WM_ERASEBKGND, sent|optional }, { WM_ERASEBKGND, sent|optional },
{ WM_WINDOWPOSCHANGED, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOMOVE|SWP_NOSIZE|SWP_NOZORDER|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, { 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 },
{ 0 } { 0 }
}; };
/* SetScrollRange for a window with a non-client area */ /* SetScrollRange for a window with a non-client area */
...@@ -740,6 +901,7 @@ static const struct message WmSetScrollRangeHV_NC_Seq[] = ...@@ -740,6 +901,7 @@ static const struct message WmSetScrollRangeHV_NC_Seq[] =
{ {
{ WM_WINDOWPOSCHANGING, sent, /*|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOMOVE|SWP_NOSIZE|SWP_NOZORDER*/ }, { WM_WINDOWPOSCHANGING, sent, /*|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOMOVE|SWP_NOSIZE|SWP_NOZORDER*/ },
{ WM_NCCALCSIZE, sent|wparam, 1 }, { WM_NCCALCSIZE, sent|wparam, 1 },
{ EVENT_OBJECT_REORDER, winevent_hook|wparam|lparam, 0, 0 },
{ WM_NCPAINT, sent|optional }, { WM_NCPAINT, sent|optional },
{ WM_GETTEXT, sent|defwinproc|optional }, { WM_GETTEXT, sent|defwinproc|optional },
{ WM_GETICON, sent|optional|defwinproc }, { WM_GETICON, sent|optional|defwinproc },
...@@ -750,6 +912,7 @@ static const struct message WmSetScrollRangeHV_NC_Seq[] = ...@@ -750,6 +912,7 @@ static const struct message WmSetScrollRangeHV_NC_Seq[] =
{ WM_CTLCOLORDLG, sent|defwinproc|optional }, /* sent to a parent of the dialog */ { WM_CTLCOLORDLG, sent|defwinproc|optional }, /* sent to a parent of the dialog */
{ WM_WINDOWPOSCHANGED, sent, /*|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOMOVE|SWP_NOSIZE|SWP_NOZORDER|0x1000*/ }, { WM_WINDOWPOSCHANGED, sent, /*|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOMOVE|SWP_NOSIZE|SWP_NOZORDER|0x1000*/ },
{ WM_SIZE, sent|defwinproc }, { WM_SIZE, sent|defwinproc },
{ EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 },
{ WM_GETTEXT, sent|optional }, { WM_GETTEXT, sent|optional },
{ WM_GETICON, sent|optional }, { WM_GETICON, sent|optional },
{ WM_GETICON, sent|optional }, { WM_GETICON, sent|optional },
...@@ -856,10 +1019,14 @@ static void ok_sequence_(const struct message *expected, const char *context, in ...@@ -856,10 +1019,14 @@ static void ok_sequence_(const struct message *expected, const char *context, in
ok_( file, line) ((expected->flags & hook) == (actual->flags & hook), ok_( file, line) ((expected->flags & hook) == (actual->flags & hook),
"%s: the msg 0x%04x should have been sent by a hook\n", "%s: the msg 0x%04x should have been sent by a hook\n",
context, expected->message); context, expected->message);
ok_( file, line) ((expected->flags & winevent_hook) == (actual->flags & winevent_hook),
"%s: the msg 0x%04x should have been sent by a winevent hook\n",
context, expected->message);
expected++; expected++;
actual++; actual++;
} }
else if (expected->flags & optional) /* silently drop winevent messages if there is no support for them */
else if ((expected->flags & optional) || ((expected->flags & winevent_hook) && !hEvent_hook))
expected++; expected++;
else if (todo) else if (todo)
{ {
...@@ -881,7 +1048,8 @@ static void ok_sequence_(const struct message *expected, const char *context, in ...@@ -881,7 +1048,8 @@ static void ok_sequence_(const struct message *expected, const char *context, in
} }
/* skip all optional trailing messages */ /* skip all optional trailing messages */
while (expected->message && (expected->flags & optional)) while (expected->message && ((expected->flags & optional) ||
((expected->flags & winevent_hook) && !hEvent_hook)))
expected++; expected++;
if (todo) if (todo)
...@@ -916,10 +1084,14 @@ static const struct message WmCreateMDIframeSeq[] = { ...@@ -916,10 +1084,14 @@ static const struct message WmCreateMDIframeSeq[] = {
{ WM_GETMINMAXINFO, sent }, { WM_GETMINMAXINFO, sent },
{ WM_NCCREATE, sent }, { WM_NCCREATE, sent },
{ WM_NCCALCSIZE, sent|wparam, 0 }, { WM_NCCALCSIZE, sent|wparam, 0 },
{ EVENT_OBJECT_REORDER, winevent_hook|wparam|lparam, 0, 0 },
{ WM_CREATE, sent }, { WM_CREATE, sent },
{ EVENT_OBJECT_CREATE, winevent_hook|wparam|lparam, 0, 0 },
{ WM_SHOWWINDOW, sent|wparam, 1 }, { WM_SHOWWINDOW, sent|wparam, 1 },
{ WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_NOSIZE|SWP_NOMOVE }, { WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_NOSIZE|SWP_NOMOVE },
{ EVENT_OBJECT_SHOW, winevent_hook|wparam|lparam, 0, 0 },
{ HCBT_ACTIVATE, hook }, { HCBT_ACTIVATE, hook },
{ EVENT_SYSTEM_FOREGROUND, winevent_hook|wparam|lparam, 0, 0 },
{ WM_QUERYNEWPALETTE, sent|wparam|lparam|optional, 0, 0 }, { WM_QUERYNEWPALETTE, sent|wparam|lparam|optional, 0, 0 },
{ WM_WINDOWPOSCHANGING, sent|wparam, SWP_NOSIZE|SWP_NOMOVE }, { WM_WINDOWPOSCHANGING, sent|wparam, SWP_NOSIZE|SWP_NOMOVE },
{ WM_WINDOWPOSCHANGED, sent|wparam|optional, SWP_NOSIZE|SWP_NOMOVE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, /* Win9x */ { WM_WINDOWPOSCHANGED, sent|wparam|optional, SWP_NOSIZE|SWP_NOMOVE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, /* Win9x */
...@@ -928,6 +1100,7 @@ static const struct message WmCreateMDIframeSeq[] = { ...@@ -928,6 +1100,7 @@ static const struct message WmCreateMDIframeSeq[] = {
{ WM_ACTIVATE, sent|wparam, 1 }, { WM_ACTIVATE, sent|wparam, 1 },
{ HCBT_SETFOCUS, hook }, { HCBT_SETFOCUS, hook },
{ WM_IME_SETCONTEXT, sent|wparam|defwinproc|optional, 1 }, { WM_IME_SETCONTEXT, sent|wparam|defwinproc|optional, 1 },
{ EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 },
{ WM_SETFOCUS, sent|wparam|defwinproc, 0 }, { WM_SETFOCUS, sent|wparam|defwinproc, 0 },
/* Win9x adds SWP_NOZORDER below */ /* Win9x adds SWP_NOZORDER below */
{ WM_WINDOWPOSCHANGED, sent, /*|wparam, SWP_SHOWWINDOW|SWP_NOSIZE|SWP_NOMOVE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE*/ }, { WM_WINDOWPOSCHANGED, sent, /*|wparam, SWP_SHOWWINDOW|SWP_NOSIZE|SWP_NOMOVE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE*/ },
...@@ -939,10 +1112,13 @@ static const struct message WmCreateMDIframeSeq[] = { ...@@ -939,10 +1112,13 @@ static const struct message WmCreateMDIframeSeq[] = {
static const struct message WmDestroyMDIframeSeq[] = { static const struct message WmDestroyMDIframeSeq[] = {
{ HCBT_DESTROYWND, hook }, { HCBT_DESTROYWND, hook },
{ WM_WINDOWPOSCHANGING, sent|wparam, SWP_HIDEWINDOW|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER }, { WM_WINDOWPOSCHANGING, sent|wparam, SWP_HIDEWINDOW|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER },
{ EVENT_OBJECT_HIDE, winevent_hook|wparam|lparam, 0, 0 },
{ WM_WINDOWPOSCHANGED, sent|wparam, SWP_HIDEWINDOW|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, { WM_WINDOWPOSCHANGED, sent|wparam, SWP_HIDEWINDOW|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE },
{ WM_NCACTIVATE, sent|wparam, 0 }, { WM_NCACTIVATE, sent|wparam, 0 },
{ WM_ACTIVATE, sent|wparam|optional, 0 }, /* Win9x */ { WM_ACTIVATE, sent|wparam|optional, 0 }, /* Win9x */
{ WM_ACTIVATEAPP, sent|wparam|optional, 0 }, /* Win9x */ { WM_ACTIVATEAPP, sent|wparam|optional, 0 }, /* Win9x */
{ EVENT_OBJECT_HIDE, winevent_hook|wparam|lparam, OBJID_CARET, 0 },
{ EVENT_OBJECT_DESTROY, winevent_hook|wparam|lparam, 0, 0 },
{ WM_DESTROY, sent }, { WM_DESTROY, sent },
{ WM_NCDESTROY, sent }, { WM_NCDESTROY, sent },
{ 0 } { 0 }
...@@ -953,11 +1129,13 @@ static const struct message WmCreateMDIclientSeq[] = { ...@@ -953,11 +1129,13 @@ static const struct message WmCreateMDIclientSeq[] = {
{ WM_NCCREATE, sent }, { WM_NCCREATE, sent },
{ WM_NCCALCSIZE, sent|wparam, 0 }, { WM_NCCALCSIZE, sent|wparam, 0 },
{ WM_CREATE, sent }, { WM_CREATE, sent },
{ EVENT_OBJECT_CREATE, winevent_hook|wparam|lparam, 0, 0 },
{ WM_SIZE, sent }, { WM_SIZE, sent },
{ WM_MOVE, sent }, { WM_MOVE, sent },
{ WM_PARENTNOTIFY, sent|wparam, WM_CREATE }, /* in MDI frame */ { WM_PARENTNOTIFY, sent|wparam, WM_CREATE }, /* in MDI frame */
{ WM_SHOWWINDOW, sent|wparam, 1 }, { WM_SHOWWINDOW, sent|wparam, 1 },
{ WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_NOACTIVATE|SWP_NOZORDER|SWP_NOSIZE|SWP_NOMOVE }, { WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_NOACTIVATE|SWP_NOZORDER|SWP_NOSIZE|SWP_NOMOVE },
{ EVENT_OBJECT_SHOW, winevent_hook|wparam|lparam, 0, 0 },
{ WM_WINDOWPOSCHANGED, sent|wparam, SWP_SHOWWINDOW|SWP_NOACTIVATE|SWP_NOZORDER|SWP_NOSIZE|SWP_NOMOVE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, { WM_WINDOWPOSCHANGED, sent|wparam, SWP_SHOWWINDOW|SWP_NOACTIVATE|SWP_NOZORDER|SWP_NOSIZE|SWP_NOMOVE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE },
{ 0 } { 0 }
}; };
...@@ -967,7 +1145,9 @@ static const struct message WmDestroyMDIclientSeq[] = { ...@@ -967,7 +1145,9 @@ static const struct message WmDestroyMDIclientSeq[] = {
{ WM_PARENTNOTIFY, sent|wparam, WM_DESTROY }, /* in MDI frame */ { WM_PARENTNOTIFY, sent|wparam, WM_DESTROY }, /* in MDI frame */
{ WM_SHOWWINDOW, sent|wparam, 0 }, { WM_SHOWWINDOW, sent|wparam, 0 },
{ WM_WINDOWPOSCHANGING, sent|wparam, SWP_HIDEWINDOW|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER }, { WM_WINDOWPOSCHANGING, sent|wparam, SWP_HIDEWINDOW|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER },
{ EVENT_OBJECT_HIDE, winevent_hook|wparam|lparam, 0, 0 },
{ WM_WINDOWPOSCHANGED, sent|wparam, SWP_HIDEWINDOW|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, { WM_WINDOWPOSCHANGED, sent|wparam, SWP_HIDEWINDOW|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE },
{ EVENT_OBJECT_DESTROY, winevent_hook|wparam|lparam, 0, 0 },
{ WM_DESTROY, sent }, { WM_DESTROY, sent },
{ WM_NCDESTROY, sent }, { WM_NCDESTROY, sent },
{ 0 } { 0 }
...@@ -978,6 +1158,7 @@ static const struct message WmCreateMDIchildVisibleSeq[] = { ...@@ -978,6 +1158,7 @@ static const struct message WmCreateMDIchildVisibleSeq[] = {
{ WM_NCCREATE, sent }, { WM_NCCREATE, sent },
{ WM_NCCALCSIZE, sent|wparam, 0 }, { WM_NCCALCSIZE, sent|wparam, 0 },
{ WM_CREATE, sent }, { WM_CREATE, sent },
{ EVENT_OBJECT_CREATE, winevent_hook|wparam|lparam, 0, 0 },
{ WM_SIZE, sent }, { WM_SIZE, sent },
{ WM_MOVE, sent }, { WM_MOVE, sent },
/* Win2k sends wparam set to /* Win2k sends wparam set to
...@@ -988,6 +1169,7 @@ static const struct message WmCreateMDIchildVisibleSeq[] = { ...@@ -988,6 +1169,7 @@ static const struct message WmCreateMDIchildVisibleSeq[] = {
{ WM_PARENTNOTIFY, sent /*|wparam, WM_CREATE*/ }, /* in MDI client */ { WM_PARENTNOTIFY, sent /*|wparam, WM_CREATE*/ }, /* in MDI client */
{ WM_SHOWWINDOW, sent|wparam, 1 }, { WM_SHOWWINDOW, sent|wparam, 1 },
{ WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER }, { WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER },
{ EVENT_OBJECT_SHOW, winevent_hook|wparam|lparam, 0, 0 },
{ WM_WINDOWPOSCHANGED, sent|wparam, SWP_SHOWWINDOW|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, { WM_WINDOWPOSCHANGED, sent|wparam, SWP_SHOWWINDOW|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE },
{ WM_MDIREFRESHMENU, sent/*|wparam|lparam, 0, 0*/ }, { WM_MDIREFRESHMENU, sent/*|wparam|lparam, 0, 0*/ },
{ WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_NOSIZE|SWP_NOMOVE }, { WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_NOSIZE|SWP_NOMOVE },
...@@ -999,11 +1181,13 @@ static const struct message WmCreateMDIchildVisibleSeq[] = { ...@@ -999,11 +1181,13 @@ static const struct message WmCreateMDIchildVisibleSeq[] = {
{ WM_NCACTIVATE, sent|wparam|defwinproc, 1 }, { WM_NCACTIVATE, sent|wparam|defwinproc, 1 },
{ HCBT_SETFOCUS, hook }, /* in MDI client */ { HCBT_SETFOCUS, hook }, /* in MDI client */
{ WM_IME_SETCONTEXT, sent|wparam|optional, 1 }, /* in MDI client */ { WM_IME_SETCONTEXT, sent|wparam|optional, 1 }, /* in MDI client */
{ EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 },
{ WM_SETFOCUS, sent }, /* in MDI client */ { WM_SETFOCUS, sent }, /* in MDI client */
{ HCBT_SETFOCUS, hook }, { HCBT_SETFOCUS, hook },
{ WM_KILLFOCUS, sent }, /* in MDI client */ { WM_KILLFOCUS, sent }, /* in MDI client */
{ WM_IME_SETCONTEXT, sent|wparam|optional, 0 }, /* in MDI client */ { WM_IME_SETCONTEXT, sent|wparam|optional, 0 }, /* in MDI client */
{ WM_IME_SETCONTEXT, sent|wparam|defwinproc|optional, 1 }, { WM_IME_SETCONTEXT, sent|wparam|defwinproc|optional, 1 },
{ EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 },
{ WM_SETFOCUS, sent|defwinproc }, { WM_SETFOCUS, sent|defwinproc },
{ WM_MDIACTIVATE, sent|defwinproc }, { WM_MDIACTIVATE, sent|defwinproc },
{ 0 } { 0 }
...@@ -1019,6 +1203,7 @@ static const struct message WmDestroyMDIchildVisibleSeq[] = { ...@@ -1019,6 +1203,7 @@ static const struct message WmDestroyMDIchildVisibleSeq[] = {
{ WM_PARENTNOTIFY, sent /*|wparam, WM_DESTROY*/ }, /* in MDI client */ { WM_PARENTNOTIFY, sent /*|wparam, WM_DESTROY*/ }, /* in MDI client */
{ WM_SHOWWINDOW, sent|wparam, 0 }, { WM_SHOWWINDOW, sent|wparam, 0 },
{ WM_WINDOWPOSCHANGING, sent|wparam, SWP_HIDEWINDOW|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER }, { WM_WINDOWPOSCHANGING, sent|wparam, SWP_HIDEWINDOW|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER },
{ EVENT_OBJECT_HIDE, winevent_hook|wparam|lparam, 0, 0 },
{ WM_ERASEBKGND, sent|parent|optional }, { WM_ERASEBKGND, sent|parent|optional },
{ WM_WINDOWPOSCHANGED, sent|wparam, SWP_HIDEWINDOW|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, { WM_WINDOWPOSCHANGED, sent|wparam, SWP_HIDEWINDOW|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE },
...@@ -1030,24 +1215,30 @@ static const struct message WmDestroyMDIchildVisibleSeq[] = { ...@@ -1030,24 +1215,30 @@ static const struct message WmDestroyMDIchildVisibleSeq[] = {
{ WM_KILLFOCUS, sent }, { WM_KILLFOCUS, sent },
{ WM_IME_SETCONTEXT, sent|wparam|optional, 0 }, { WM_IME_SETCONTEXT, sent|wparam|optional, 0 },
{ WM_IME_SETCONTEXT, sent|wparam|optional, 1 }, /* in MDI client */ { WM_IME_SETCONTEXT, sent|wparam|optional, 1 }, /* in MDI client */
{ EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 },
{ WM_SETFOCUS, sent }, /* in MDI client */ { WM_SETFOCUS, sent }, /* in MDI client */
{ HCBT_SETFOCUS, hook }, /* MDI client sets focus back to MDI child */ { HCBT_SETFOCUS, hook }, /* MDI client sets focus back to MDI child */
{ WM_KILLFOCUS, sent }, /* in MDI client */ { WM_KILLFOCUS, sent }, /* in MDI client */
{ WM_IME_SETCONTEXT, sent|wparam|optional, 0 }, /* in MDI client */ { WM_IME_SETCONTEXT, sent|wparam|optional, 0 }, /* in MDI client */
{ WM_IME_SETCONTEXT, sent|wparam|optional, 1 }, { WM_IME_SETCONTEXT, sent|wparam|optional, 1 },
{ EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 },
{ WM_SETFOCUS, sent }, /* in MDI client */ { WM_SETFOCUS, sent }, /* in MDI client */
{ EVENT_OBJECT_DESTROY, winevent_hook|wparam|lparam, 0, 0 },
{ HCBT_SETFOCUS, hook }, /* set focus to MDI client */ { HCBT_SETFOCUS, hook }, /* set focus to MDI client */
{ WM_KILLFOCUS, sent }, { WM_KILLFOCUS, sent },
{ WM_IME_SETCONTEXT, sent|wparam|optional, 0 }, { WM_IME_SETCONTEXT, sent|wparam|optional, 0 },
{ WM_IME_SETCONTEXT, sent|wparam|optional, 1 }, /* in MDI client */ { WM_IME_SETCONTEXT, sent|wparam|optional, 1 }, /* in MDI client */
{ EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 },
{ WM_SETFOCUS, sent }, /* in MDI client */ { WM_SETFOCUS, sent }, /* in MDI client */
{ HCBT_SETFOCUS, hook }, /* MDI client sets focus back to MDI child */ { HCBT_SETFOCUS, hook }, /* MDI client sets focus back to MDI child */
{ WM_KILLFOCUS, sent }, /* in MDI client */ { WM_KILLFOCUS, sent }, /* in MDI client */
{ WM_IME_SETCONTEXT, sent|wparam|optional, 0 }, /* in MDI client */ { WM_IME_SETCONTEXT, sent|wparam|optional, 0 }, /* in MDI client */
{ WM_IME_SETCONTEXT, sent|wparam|optional, 1 }, { WM_IME_SETCONTEXT, sent|wparam|optional, 1 },
{ EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 },
{ WM_SETFOCUS, sent }, /* in MDI client */ { WM_SETFOCUS, sent }, /* in MDI client */
{ WM_DESTROY, sent }, { WM_DESTROY, sent },
...@@ -1056,12 +1247,14 @@ static const struct message WmDestroyMDIchildVisibleSeq[] = { ...@@ -1056,12 +1247,14 @@ static const struct message WmDestroyMDIchildVisibleSeq[] = {
{ WM_KILLFOCUS, sent }, { WM_KILLFOCUS, sent },
{ WM_IME_SETCONTEXT, sent|wparam|optional, 0 }, { WM_IME_SETCONTEXT, sent|wparam|optional, 0 },
{ WM_IME_SETCONTEXT, sent|wparam|optional, 1 }, /* in MDI client */ { WM_IME_SETCONTEXT, sent|wparam|optional, 1 }, /* in MDI client */
{ EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 },
{ WM_SETFOCUS, sent }, /* in MDI client */ { WM_SETFOCUS, sent }, /* in MDI client */
{ HCBT_SETFOCUS, hook }, /* MDI client sets focus back to MDI child */ { HCBT_SETFOCUS, hook }, /* MDI client sets focus back to MDI child */
{ WM_KILLFOCUS, sent }, /* in MDI client */ { WM_KILLFOCUS, sent }, /* in MDI client */
{ WM_IME_SETCONTEXT, sent|wparam|optional, 0 }, /* in MDI client */ { WM_IME_SETCONTEXT, sent|wparam|optional, 0 }, /* in MDI client */
{ WM_IME_SETCONTEXT, sent|wparam|optional, 1 }, { WM_IME_SETCONTEXT, sent|wparam|optional, 1 },
{ EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 },
{ WM_SETFOCUS, sent }, /* in MDI client */ { WM_SETFOCUS, sent }, /* in MDI client */
{ WM_NCDESTROY, sent }, { WM_NCDESTROY, sent },
...@@ -1073,6 +1266,7 @@ static const struct message WmCreateMDIchildInvisibleSeq[] = { ...@@ -1073,6 +1266,7 @@ static const struct message WmCreateMDIchildInvisibleSeq[] = {
{ WM_NCCREATE, sent }, { WM_NCCREATE, sent },
{ WM_NCCALCSIZE, sent|wparam, 0 }, { WM_NCCALCSIZE, sent|wparam, 0 },
{ WM_CREATE, sent }, { WM_CREATE, sent },
{ EVENT_OBJECT_CREATE, winevent_hook|wparam|lparam, 0, 0 },
{ WM_SIZE, sent }, { WM_SIZE, sent },
{ WM_MOVE, sent }, { WM_MOVE, sent },
/* Win2k sends wparam set to /* Win2k sends wparam set to
...@@ -1092,6 +1286,7 @@ static const struct message WmDestroyMDIchildInvisibleSeq[] = { ...@@ -1092,6 +1286,7 @@ static const struct message WmDestroyMDIchildInvisibleSeq[] = {
* CLIENTCREATESTRUCT.idFirstChild * CLIENTCREATESTRUCT.idFirstChild
*/ */
{ WM_PARENTNOTIFY, sent /*|wparam, WM_DESTROY*/ }, /* in MDI client */ { WM_PARENTNOTIFY, sent /*|wparam, WM_DESTROY*/ }, /* in MDI client */
{ EVENT_OBJECT_DESTROY, winevent_hook|wparam|lparam, 0, 0 },
{ WM_DESTROY, sent }, { WM_DESTROY, sent },
{ WM_NCDESTROY, sent }, { WM_NCDESTROY, sent },
{ 0 } { 0 }
...@@ -1102,6 +1297,7 @@ static const struct message WmCreateMDIchildVisibleMaxSeq1[] = { ...@@ -1102,6 +1297,7 @@ static const struct message WmCreateMDIchildVisibleMaxSeq1[] = {
{ WM_NCCREATE, sent }, { WM_NCCREATE, sent },
{ WM_NCCALCSIZE, sent|wparam, 0 }, { WM_NCCALCSIZE, sent|wparam, 0 },
{ WM_CREATE, sent }, { WM_CREATE, sent },
{ EVENT_OBJECT_CREATE, winevent_hook|wparam|lparam, 0, 0 },
{ WM_SIZE, sent }, { WM_SIZE, sent },
{ WM_MOVE, sent }, { WM_MOVE, sent },
{ HCBT_MINMAX, hook|lparam, 0, SW_MAXIMIZE }, { HCBT_MINMAX, hook|lparam, 0, SW_MAXIMIZE },
...@@ -1114,6 +1310,8 @@ static const struct message WmCreateMDIchildVisibleMaxSeq1[] = { ...@@ -1114,6 +1310,8 @@ static const struct message WmCreateMDIchildVisibleMaxSeq1[] = {
{ WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER }, { WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER },
{ WM_NCCALCSIZE, sent|wparam, 1 }, { WM_NCCALCSIZE, sent|wparam, 1 },
{ WM_WINDOWPOSCHANGED, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, { WM_WINDOWPOSCHANGED, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE },
{ EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, /* MDI frame */
{ EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, /* MDI child */
/* Win2k sends wparam set to /* Win2k sends wparam set to
* MAKEWPARAM(WM_CREATE, MDI_FIRST_CHILD_ID + nTotalCreated), * MAKEWPARAM(WM_CREATE, MDI_FIRST_CHILD_ID + nTotalCreated),
* while Win9x doesn't bother to set child window id according to * while Win9x doesn't bother to set child window id according to
...@@ -1122,6 +1320,7 @@ static const struct message WmCreateMDIchildVisibleMaxSeq1[] = { ...@@ -1122,6 +1320,7 @@ static const struct message WmCreateMDIchildVisibleMaxSeq1[] = {
{ WM_PARENTNOTIFY, sent /*|wparam, WM_CREATE*/ }, /* in MDI client */ { WM_PARENTNOTIFY, sent /*|wparam, WM_CREATE*/ }, /* in MDI client */
{ WM_SHOWWINDOW, sent|wparam, 1 }, { WM_SHOWWINDOW, sent|wparam, 1 },
{ WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER }, { WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER },
{ EVENT_OBJECT_SHOW, winevent_hook|wparam|lparam, 0, 0 },
{ WM_WINDOWPOSCHANGED, sent|wparam, SWP_SHOWWINDOW|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, { WM_WINDOWPOSCHANGED, sent|wparam, SWP_SHOWWINDOW|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE },
{ WM_MDIREFRESHMENU, sent/*|wparam|lparam, 0, 0*/ }, { WM_MDIREFRESHMENU, sent/*|wparam|lparam, 0, 0*/ },
{ WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_NOSIZE|SWP_NOMOVE }, { WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_NOSIZE|SWP_NOMOVE },
...@@ -1133,17 +1332,20 @@ static const struct message WmCreateMDIchildVisibleMaxSeq1[] = { ...@@ -1133,17 +1332,20 @@ static const struct message WmCreateMDIchildVisibleMaxSeq1[] = {
{ WM_NCACTIVATE, sent|wparam|defwinproc, 1 }, { WM_NCACTIVATE, sent|wparam|defwinproc, 1 },
{ HCBT_SETFOCUS, hook }, /* in MDI client */ { HCBT_SETFOCUS, hook }, /* in MDI client */
{ WM_IME_SETCONTEXT, sent|wparam|optional, 1 }, /* in MDI client */ { WM_IME_SETCONTEXT, sent|wparam|optional, 1 }, /* in MDI client */
{ EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 },
{ WM_SETFOCUS, sent }, /* in MDI client */ { WM_SETFOCUS, sent }, /* in MDI client */
{ HCBT_SETFOCUS, hook }, { HCBT_SETFOCUS, hook },
{ WM_KILLFOCUS, sent }, /* in MDI client */ { WM_KILLFOCUS, sent }, /* in MDI client */
{ WM_IME_SETCONTEXT, sent|wparam|optional, 0 }, /* in MDI client */ { WM_IME_SETCONTEXT, sent|wparam|optional, 0 }, /* in MDI client */
{ WM_IME_SETCONTEXT, sent|wparam|defwinproc|optional, 1 }, { WM_IME_SETCONTEXT, sent|wparam|defwinproc|optional, 1 },
{ EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 },
{ WM_SETFOCUS, sent|defwinproc }, { WM_SETFOCUS, sent|defwinproc },
{ WM_MDIACTIVATE, sent|defwinproc }, { WM_MDIACTIVATE, sent|defwinproc },
/* in MDI frame */ /* in MDI frame */
{ WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER }, { WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER },
{ WM_NCCALCSIZE, sent|wparam, 1 }, { WM_NCCALCSIZE, sent|wparam, 1 },
{ WM_WINDOWPOSCHANGED, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, { WM_WINDOWPOSCHANGED, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE },
{ EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, /* MDI frame */
{ 0 } { 0 }
}; };
/* CreateWindow for the 2nd MDI child window, initially visible and maximized */ /* CreateWindow for the 2nd MDI child window, initially visible and maximized */
...@@ -1160,24 +1362,30 @@ static const struct message WmCreateMDIchildVisibleMaxSeq2[] = { ...@@ -1160,24 +1362,30 @@ static const struct message WmCreateMDIchildVisibleMaxSeq2[] = {
{ WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER }, { WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER },
{ WM_NCCALCSIZE, sent|wparam, 1 }, { WM_NCCALCSIZE, sent|wparam, 1 },
{ WM_WINDOWPOSCHANGED, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, { WM_WINDOWPOSCHANGED, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE },
{ EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, /* MDI frame */
{ EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, /* MDI child */
{ WM_SETREDRAW, sent|wparam, 1 }, /* in the 1st MDI child */ { WM_SETREDRAW, sent|wparam, 1 }, /* in the 1st MDI child */
/* create the 2nd MDI child */ /* create the 2nd MDI child */
{ HCBT_CREATEWND, hook }, { HCBT_CREATEWND, hook },
{ WM_NCCREATE, sent }, { WM_NCCREATE, sent },
{ WM_NCCALCSIZE, sent|wparam, 0 }, { WM_NCCALCSIZE, sent|wparam, 0 },
{ WM_CREATE, sent }, { WM_CREATE, sent },
{ EVENT_OBJECT_CREATE, winevent_hook|wparam|lparam, 0, 0 },
{ WM_SIZE, sent }, { WM_SIZE, sent },
{ WM_MOVE, sent }, { WM_MOVE, sent },
{ HCBT_MINMAX, hook|lparam, 0, SW_MAXIMIZE }, { HCBT_MINMAX, hook|lparam, 0, SW_MAXIMIZE },
{ WM_GETMINMAXINFO, sent }, { WM_GETMINMAXINFO, sent },
{ WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|0x8000 }, { WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|0x8000 },
{ WM_NCCALCSIZE, sent|wparam, 1 }, { WM_NCCALCSIZE, sent|wparam, 1 },
{ EVENT_OBJECT_REORDER, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 },
{ WM_WINDOWPOSCHANGED, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOREDRAW|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE|0x8000 }, { WM_WINDOWPOSCHANGED, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOREDRAW|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE|0x8000 },
{ WM_SIZE, sent|defwinproc }, { WM_SIZE, sent|defwinproc },
/* in MDI frame */ /* in MDI frame */
{ WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER }, { WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER },
{ WM_NCCALCSIZE, sent|wparam, 1 }, { WM_NCCALCSIZE, sent|wparam, 1 },
{ WM_WINDOWPOSCHANGED, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, { WM_WINDOWPOSCHANGED, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE },
{ EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, /* MDI frame */
{ EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, /* MDI child */
/* Win2k sends wparam set to /* Win2k sends wparam set to
* MAKEWPARAM(WM_CREATE, MDI_FIRST_CHILD_ID + nTotalCreated), * MAKEWPARAM(WM_CREATE, MDI_FIRST_CHILD_ID + nTotalCreated),
* while Win9x doesn't bother to set child window id according to * while Win9x doesn't bother to set child window id according to
...@@ -1186,6 +1394,7 @@ static const struct message WmCreateMDIchildVisibleMaxSeq2[] = { ...@@ -1186,6 +1394,7 @@ static const struct message WmCreateMDIchildVisibleMaxSeq2[] = {
{ WM_PARENTNOTIFY, sent /*|wparam, WM_CREATE*/ }, /* in MDI client */ { WM_PARENTNOTIFY, sent /*|wparam, WM_CREATE*/ }, /* in MDI client */
{ WM_SHOWWINDOW, sent|wparam, 1 }, { WM_SHOWWINDOW, sent|wparam, 1 },
{ WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER }, { WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER },
{ EVENT_OBJECT_SHOW, winevent_hook|wparam|lparam, 0, 0 },
{ WM_WINDOWPOSCHANGED, sent|wparam, SWP_SHOWWINDOW|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, { WM_WINDOWPOSCHANGED, sent|wparam, SWP_SHOWWINDOW|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE },
{ WM_MDIREFRESHMENU, sent/*|wparam|lparam, 0, 0*/ }, { WM_MDIREFRESHMENU, sent/*|wparam|lparam, 0, 0*/ },
{ WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_NOSIZE|SWP_NOMOVE }, { WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_NOSIZE|SWP_NOMOVE },
...@@ -1203,11 +1412,13 @@ static const struct message WmCreateMDIchildVisibleMaxSeq2[] = { ...@@ -1203,11 +1412,13 @@ static const struct message WmCreateMDIchildVisibleMaxSeq2[] = {
{ WM_KILLFOCUS, sent|defwinproc }, /* in the 1st MDI child */ { WM_KILLFOCUS, sent|defwinproc }, /* in the 1st MDI child */
{ WM_IME_SETCONTEXT, sent|wparam|defwinproc|optional, 0 }, /* in the 1st MDI child */ { WM_IME_SETCONTEXT, sent|wparam|defwinproc|optional, 0 }, /* in the 1st MDI child */
{ WM_IME_SETCONTEXT, sent|wparam|optional, 1 }, /* in MDI client */ { WM_IME_SETCONTEXT, sent|wparam|optional, 1 }, /* in MDI client */
{ EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 },
{ WM_SETFOCUS, sent }, /* in MDI client */ { WM_SETFOCUS, sent }, /* in MDI client */
{ HCBT_SETFOCUS, hook }, { HCBT_SETFOCUS, hook },
{ WM_KILLFOCUS, sent }, /* in MDI client */ { WM_KILLFOCUS, sent }, /* in MDI client */
{ WM_IME_SETCONTEXT, sent|wparam|optional, 0 }, /* in MDI client */ { WM_IME_SETCONTEXT, sent|wparam|optional, 0 }, /* in MDI client */
{ WM_IME_SETCONTEXT, sent|wparam|defwinproc|optional, 1 }, { WM_IME_SETCONTEXT, sent|wparam|defwinproc|optional, 1 },
{ EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 },
{ WM_SETFOCUS, sent|defwinproc }, { WM_SETFOCUS, sent|defwinproc },
{ WM_MDIACTIVATE, sent|defwinproc }, { WM_MDIACTIVATE, sent|defwinproc },
...@@ -1215,6 +1426,7 @@ static const struct message WmCreateMDIchildVisibleMaxSeq2[] = { ...@@ -1215,6 +1426,7 @@ static const struct message WmCreateMDIchildVisibleMaxSeq2[] = {
{ WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER }, { WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER },
{ WM_NCCALCSIZE, sent|wparam, 1 }, { WM_NCCALCSIZE, sent|wparam, 1 },
{ WM_WINDOWPOSCHANGED, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, { WM_WINDOWPOSCHANGED, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE },
{ EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, /* MDI frame */
{ 0 } { 0 }
}; };
/* WM_MDICREATE MDI child window, initially visible and maximized */ /* WM_MDICREATE MDI child window, initially visible and maximized */
...@@ -1224,6 +1436,7 @@ static const struct message WmCreateMDIchildVisibleMaxSeq3[] = { ...@@ -1224,6 +1436,7 @@ static const struct message WmCreateMDIchildVisibleMaxSeq3[] = {
{ WM_NCCREATE, sent }, { WM_NCCREATE, sent },
{ WM_NCCALCSIZE, sent|wparam, 0 }, { WM_NCCALCSIZE, sent|wparam, 0 },
{ WM_CREATE, sent }, { WM_CREATE, sent },
{ EVENT_OBJECT_CREATE, winevent_hook|wparam|lparam, 0, 0 },
{ WM_SIZE, sent }, { WM_SIZE, sent },
{ WM_MOVE, sent }, { WM_MOVE, sent },
{ HCBT_MINMAX, hook|lparam, 0, SW_MAXIMIZE }, { HCBT_MINMAX, hook|lparam, 0, SW_MAXIMIZE },
...@@ -1232,10 +1445,14 @@ static const struct message WmCreateMDIchildVisibleMaxSeq3[] = { ...@@ -1232,10 +1445,14 @@ static const struct message WmCreateMDIchildVisibleMaxSeq3[] = {
{ WM_NCCALCSIZE, sent|wparam, 1 }, { WM_NCCALCSIZE, sent|wparam, 1 },
{ WM_WINDOWPOSCHANGED, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER|SWP_NOREDRAW|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE|0x8000 }, { WM_WINDOWPOSCHANGED, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER|SWP_NOREDRAW|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE|0x8000 },
{ WM_SIZE, sent|defwinproc }, { WM_SIZE, sent|defwinproc },
/* in MDI frame */ /* in MDI frame */
{ WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER }, { WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER },
{ WM_NCCALCSIZE, sent|wparam, 1 }, { WM_NCCALCSIZE, sent|wparam, 1 },
{ WM_WINDOWPOSCHANGED, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, { WM_WINDOWPOSCHANGED, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE },
{ EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, /* MDI frame */
{ EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, /* MDI child */
/* Win2k sends wparam set to /* Win2k sends wparam set to
* MAKEWPARAM(WM_CREATE, MDI_FIRST_CHILD_ID + nTotalCreated), * MAKEWPARAM(WM_CREATE, MDI_FIRST_CHILD_ID + nTotalCreated),
* while Win9x doesn't bother to set child window id according to * while Win9x doesn't bother to set child window id according to
...@@ -1244,9 +1461,13 @@ static const struct message WmCreateMDIchildVisibleMaxSeq3[] = { ...@@ -1244,9 +1461,13 @@ static const struct message WmCreateMDIchildVisibleMaxSeq3[] = {
{ WM_PARENTNOTIFY, sent /*|wparam, WM_CREATE*/ }, /* in MDI client */ { WM_PARENTNOTIFY, sent /*|wparam, WM_CREATE*/ }, /* in MDI client */
{ WM_SHOWWINDOW, sent|wparam, 1 }, { WM_SHOWWINDOW, sent|wparam, 1 },
{ WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER }, { WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER },
{ EVENT_OBJECT_SHOW, winevent_hook|wparam|lparam, 0, 0 },
{ WM_WINDOWPOSCHANGED, sent|wparam, SWP_SHOWWINDOW|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, { WM_WINDOWPOSCHANGED, sent|wparam, SWP_SHOWWINDOW|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE },
{ WM_MDIREFRESHMENU, sent/*|wparam|lparam, 0, 0*/ }, { WM_MDIREFRESHMENU, sent/*|wparam|lparam, 0, 0*/ },
{ WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_NOSIZE|SWP_NOMOVE }, { WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_NOSIZE|SWP_NOMOVE },
{ WM_CHILDACTIVATE, sent|wparam|lparam, 0, 0 }, { WM_CHILDACTIVATE, sent|wparam|lparam, 0, 0 },
{ WM_WINDOWPOSCHANGING, sent|wparam|defwinproc, SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE }, { WM_WINDOWPOSCHANGING, sent|wparam|defwinproc, SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE },
...@@ -1255,11 +1476,13 @@ static const struct message WmCreateMDIchildVisibleMaxSeq3[] = { ...@@ -1255,11 +1476,13 @@ static const struct message WmCreateMDIchildVisibleMaxSeq3[] = {
{ WM_NCACTIVATE, sent|wparam|defwinproc, 1 }, { WM_NCACTIVATE, sent|wparam|defwinproc, 1 },
{ HCBT_SETFOCUS, hook }, /* in MDI client */ { HCBT_SETFOCUS, hook }, /* in MDI client */
{ WM_IME_SETCONTEXT, sent|wparam|optional, 1 }, /* in MDI client */ { WM_IME_SETCONTEXT, sent|wparam|optional, 1 }, /* in MDI client */
{ EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 },
{ WM_SETFOCUS, sent }, /* in MDI client */ { WM_SETFOCUS, sent }, /* in MDI client */
{ HCBT_SETFOCUS, hook }, { HCBT_SETFOCUS, hook },
{ WM_KILLFOCUS, sent }, /* in MDI client */ { WM_KILLFOCUS, sent }, /* in MDI client */
{ WM_IME_SETCONTEXT, sent|wparam|optional, 0 }, /* in MDI client */ { WM_IME_SETCONTEXT, sent|wparam|optional, 0 }, /* in MDI client */
{ WM_IME_SETCONTEXT, sent|wparam|defwinproc|optional, 1 }, { WM_IME_SETCONTEXT, sent|wparam|defwinproc|optional, 1 },
{ EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 },
{ WM_SETFOCUS, sent|defwinproc }, { WM_SETFOCUS, sent|defwinproc },
{ WM_MDIACTIVATE, sent|defwinproc }, { WM_MDIACTIVATE, sent|defwinproc },
...@@ -1268,6 +1491,7 @@ static const struct message WmCreateMDIchildVisibleMaxSeq3[] = { ...@@ -1268,6 +1491,7 @@ static const struct message WmCreateMDIchildVisibleMaxSeq3[] = {
{ WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER }, { WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER },
{ WM_NCCALCSIZE, sent|wparam, 1 }, { WM_NCCALCSIZE, sent|wparam, 1 },
{ WM_WINDOWPOSCHANGED, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, { WM_WINDOWPOSCHANGED, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE },
{ EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 },
/* in MDI frame */ /* in MDI frame */
{ WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER }, { WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER },
...@@ -1288,6 +1512,10 @@ static const struct message WmCreateMDIchildVisibleMaxSeq3[] = { ...@@ -1288,6 +1512,10 @@ static const struct message WmCreateMDIchildVisibleMaxSeq3[] = {
{ WM_WINDOWPOSCHANGED, sent|wparam, SWP_NOACTIVATE|SWP_NOMOVE|SWP_NOZORDER|SWP_NOCLIENTMOVE }, { WM_WINDOWPOSCHANGED, sent|wparam, SWP_NOACTIVATE|SWP_NOMOVE|SWP_NOZORDER|SWP_NOCLIENTMOVE },
{ WM_SIZE, sent|defwinproc }, { 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 */
{ EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, /* MDI frame */
{ 0 } { 0 }
}; };
/* WM_SYSCOMMAND/SC_CLOSE for the 2nd MDI child window, initially visible and maximized */ /* WM_SYSCOMMAND/SC_CLOSE for the 2nd MDI child window, initially visible and maximized */
...@@ -1300,6 +1528,9 @@ static const struct message WmDestroyMDIchildVisibleMaxSeq2[] = { ...@@ -1300,6 +1528,9 @@ static const struct message WmDestroyMDIchildVisibleMaxSeq2[] = {
/* bring the 1st MDI child to top */ /* bring the 1st MDI child to top */
{ WM_WINDOWPOSCHANGING, sent|wparam|defwinproc, SWP_NOSIZE|SWP_NOMOVE }, /* in the 1st MDI child */ { WM_WINDOWPOSCHANGING, sent|wparam|defwinproc, SWP_NOSIZE|SWP_NOMOVE }, /* in the 1st MDI child */
{ WM_WINDOWPOSCHANGING, sent|wparam|defwinproc, SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE }, /* in the 2nd MDI child */ { WM_WINDOWPOSCHANGING, sent|wparam|defwinproc, SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE }, /* in the 2nd MDI child */
{ EVENT_OBJECT_REORDER, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 },
{ WM_CHILDACTIVATE, sent|defwinproc|wparam|lparam, 0, 0 }, /* in the 1st MDI child */ { WM_CHILDACTIVATE, sent|defwinproc|wparam|lparam, 0, 0 }, /* in the 1st MDI child */
{ WM_NCACTIVATE, sent|wparam|defwinproc, 0 }, /* in the 1st MDI child */ { WM_NCACTIVATE, sent|wparam|defwinproc, 0 }, /* in the 1st MDI child */
{ WM_MDIACTIVATE, sent|defwinproc }, /* in the 1st MDI child */ { WM_MDIACTIVATE, sent|defwinproc }, /* in the 1st MDI child */
...@@ -1318,13 +1549,21 @@ static const struct message WmDestroyMDIchildVisibleMaxSeq2[] = { ...@@ -1318,13 +1549,21 @@ static const struct message WmDestroyMDIchildVisibleMaxSeq2[] = {
{ HCBT_MINMAX, hook }, { HCBT_MINMAX, hook },
{ WM_WINDOWPOSCHANGING, sent|wparam|defwinproc, SWP_NOACTIVATE|SWP_FRAMECHANGED|SWP_SHOWWINDOW|SWP_NOZORDER|0x8000 }, { WM_WINDOWPOSCHANGING, sent|wparam|defwinproc, SWP_NOACTIVATE|SWP_FRAMECHANGED|SWP_SHOWWINDOW|SWP_NOZORDER|0x8000 },
{ WM_NCCALCSIZE, sent|defwinproc|wparam, 1 }, { WM_NCCALCSIZE, sent|defwinproc|wparam, 1 },
{ EVENT_OBJECT_SHOW, winevent_hook|wparam|lparam, 0, 0 },
{ WM_WINDOWPOSCHANGED, sent|wparam|defwinproc, SWP_NOACTIVATE|SWP_FRAMECHANGED|SWP_SHOWWINDOW|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER|SWP_NOREDRAW|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE|0x8000 }, { WM_WINDOWPOSCHANGED, sent|wparam|defwinproc, SWP_NOACTIVATE|SWP_FRAMECHANGED|SWP_SHOWWINDOW|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER|SWP_NOREDRAW|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE|0x8000 },
{ WM_SIZE, sent|defwinproc }, { WM_SIZE, sent|defwinproc },
{ EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, /* MDI frame */
{ WM_SETREDRAW, sent|defwinproc|wparam, 1 }, { WM_SETREDRAW, sent|defwinproc|wparam, 1 },
/* in MDI frame */ /* in MDI frame */
{ WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER }, { WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER },
{ WM_NCCALCSIZE, sent|wparam, 1 }, { WM_NCCALCSIZE, sent|wparam, 1 },
{ WM_WINDOWPOSCHANGED, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, { WM_WINDOWPOSCHANGED, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE },
{ EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, /* MDI frame */
{ EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, /* MDI child */
/* bring the 1st MDI child to top */ /* bring the 1st MDI child to top */
{ WM_WINDOWPOSCHANGING, sent|wparam|defwinproc, SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE }, { WM_WINDOWPOSCHANGING, sent|wparam|defwinproc, SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE },
...@@ -1333,11 +1572,13 @@ static const struct message WmDestroyMDIchildVisibleMaxSeq2[] = { ...@@ -1333,11 +1572,13 @@ static const struct message WmDestroyMDIchildVisibleMaxSeq2[] = {
{ WM_KILLFOCUS, sent|defwinproc }, { WM_KILLFOCUS, sent|defwinproc },
{ WM_IME_SETCONTEXT, sent|wparam|defwinproc|optional, 0 }, { WM_IME_SETCONTEXT, sent|wparam|defwinproc|optional, 0 },
{ WM_IME_SETCONTEXT, sent|wparam|optional, 1 }, /* in MDI client */ { WM_IME_SETCONTEXT, sent|wparam|optional, 1 }, /* in MDI client */
{ EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 },
{ WM_SETFOCUS, sent }, /* in MDI client */ { WM_SETFOCUS, sent }, /* in MDI client */
{ HCBT_SETFOCUS, hook }, { HCBT_SETFOCUS, hook },
{ WM_KILLFOCUS, sent }, /* in MDI client */ { WM_KILLFOCUS, sent }, /* in MDI client */
{ WM_IME_SETCONTEXT, sent|wparam|optional, 0 }, /* in MDI client */ { WM_IME_SETCONTEXT, sent|wparam|optional, 0 }, /* in MDI client */
{ WM_IME_SETCONTEXT, sent|wparam|defwinproc|optional, 1 }, { WM_IME_SETCONTEXT, sent|wparam|defwinproc|optional, 1 },
{ EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 },
{ WM_SETFOCUS, sent|defwinproc }, { WM_SETFOCUS, sent|defwinproc },
{ WM_MDIACTIVATE, sent|defwinproc }, { WM_MDIACTIVATE, sent|defwinproc },
{ WM_WINDOWPOSCHANGED, sent|wparam|defwinproc, SWP_NOSIZE|SWP_NOMOVE|SWP_NOREDRAW|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, { WM_WINDOWPOSCHANGED, sent|wparam|defwinproc, SWP_NOSIZE|SWP_NOMOVE|SWP_NOREDRAW|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE },
...@@ -1345,6 +1586,7 @@ static const struct message WmDestroyMDIchildVisibleMaxSeq2[] = { ...@@ -1345,6 +1586,7 @@ static const struct message WmDestroyMDIchildVisibleMaxSeq2[] = {
/* apparently ShowWindow(SW_SHOW) on an MDI client */ /* apparently ShowWindow(SW_SHOW) on an MDI client */
{ WM_SHOWWINDOW, sent|wparam, 1 }, { WM_SHOWWINDOW, sent|wparam, 1 },
{ WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER }, { WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER },
{ EVENT_OBJECT_SHOW, winevent_hook|wparam|lparam, 0, 0 },
{ WM_WINDOWPOSCHANGED, sent|wparam, SWP_SHOWWINDOW|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, { WM_WINDOWPOSCHANGED, sent|wparam, SWP_SHOWWINDOW|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE },
{ WM_MDIREFRESHMENU, sent }, { WM_MDIREFRESHMENU, sent },
...@@ -1357,9 +1599,11 @@ static const struct message WmDestroyMDIchildVisibleMaxSeq2[] = { ...@@ -1357,9 +1599,11 @@ static const struct message WmDestroyMDIchildVisibleMaxSeq2[] = {
{ WM_PARENTNOTIFY, sent /*|wparam, WM_DESTROY*/ }, /* in MDI client */ { WM_PARENTNOTIFY, sent /*|wparam, WM_DESTROY*/ }, /* in MDI client */
{ WM_SHOWWINDOW, sent|defwinproc|wparam, 0 }, { WM_SHOWWINDOW, sent|defwinproc|wparam, 0 },
{ WM_WINDOWPOSCHANGING, sent|wparam|defwinproc, SWP_HIDEWINDOW|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER }, { WM_WINDOWPOSCHANGING, sent|wparam|defwinproc, SWP_HIDEWINDOW|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER },
{ EVENT_OBJECT_HIDE, winevent_hook|wparam|lparam, 0, 0 },
{ WM_ERASEBKGND, sent|parent|optional }, { WM_ERASEBKGND, sent|parent|optional },
{ WM_WINDOWPOSCHANGED, sent|wparam|defwinproc, SWP_HIDEWINDOW|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, { WM_WINDOWPOSCHANGED, sent|wparam|defwinproc, SWP_HIDEWINDOW|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE },
{ EVENT_OBJECT_DESTROY, winevent_hook|wparam|lparam, 0, 0 },
{ WM_DESTROY, sent|defwinproc }, { WM_DESTROY, sent|defwinproc },
{ WM_NCDESTROY, sent|defwinproc }, { WM_NCDESTROY, sent|defwinproc },
{ 0 } { 0 }
...@@ -1369,6 +1613,7 @@ static const struct message WmDestroyMDIchildVisibleMaxSeq1[] = { ...@@ -1369,6 +1613,7 @@ static const struct message WmDestroyMDIchildVisibleMaxSeq1[] = {
{ WM_MDIDESTROY, sent }, /* in MDI client */ { WM_MDIDESTROY, sent }, /* in MDI client */
{ WM_SHOWWINDOW, sent|wparam, 0 }, { WM_SHOWWINDOW, sent|wparam, 0 },
{ WM_WINDOWPOSCHANGING, sent|wparam, SWP_HIDEWINDOW|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER }, { WM_WINDOWPOSCHANGING, sent|wparam, SWP_HIDEWINDOW|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER },
{ EVENT_OBJECT_HIDE, winevent_hook|wparam|lparam, 0, 0 },
{ WM_ERASEBKGND, sent|parent|optional }, { WM_ERASEBKGND, sent|parent|optional },
{ WM_WINDOWPOSCHANGED, sent|wparam, SWP_HIDEWINDOW|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, { WM_WINDOWPOSCHANGED, sent|wparam, SWP_HIDEWINDOW|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE },
...@@ -1376,17 +1621,20 @@ static const struct message WmDestroyMDIchildVisibleMaxSeq1[] = { ...@@ -1376,17 +1621,20 @@ static const struct message WmDestroyMDIchildVisibleMaxSeq1[] = {
{ WM_KILLFOCUS, sent }, { WM_KILLFOCUS, sent },
{ WM_IME_SETCONTEXT, sent|wparam|optional, 0 }, { WM_IME_SETCONTEXT, sent|wparam|optional, 0 },
{ WM_IME_SETCONTEXT, sent|wparam|optional, 1 }, /* in MDI client */ { WM_IME_SETCONTEXT, sent|wparam|optional, 1 }, /* in MDI client */
{ EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 },
{ WM_SETFOCUS, sent }, /* in MDI client */ { WM_SETFOCUS, sent }, /* in MDI client */
{ HCBT_SETFOCUS, hook }, { HCBT_SETFOCUS, hook },
{ WM_KILLFOCUS, sent }, /* in MDI client */ { WM_KILLFOCUS, sent }, /* in MDI client */
{ WM_IME_SETCONTEXT, sent|wparam|optional, 0 }, /* in MDI client */ { WM_IME_SETCONTEXT, sent|wparam|optional, 0 }, /* in MDI client */
{ WM_IME_SETCONTEXT, sent|wparam|optional, 1 }, { WM_IME_SETCONTEXT, sent|wparam|optional, 1 },
{ EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 },
{ WM_SETFOCUS, sent }, { WM_SETFOCUS, sent },
/* in MDI child */ /* in MDI child */
{ WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER }, { WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER },
{ WM_NCCALCSIZE, sent|wparam, 1 }, { WM_NCCALCSIZE, sent|wparam, 1 },
{ WM_WINDOWPOSCHANGED, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER|SWP_NOREDRAW|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, { WM_WINDOWPOSCHANGED, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER|SWP_NOREDRAW|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE },
{ EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, /* MDI child */
/* in MDI frame */ /* in MDI frame */
{ WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER }, { WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER },
...@@ -1411,6 +1659,7 @@ static const struct message WmDestroyMDIchildVisibleMaxSeq1[] = { ...@@ -1411,6 +1659,7 @@ static const struct message WmDestroyMDIchildVisibleMaxSeq1[] = {
{ WM_WINDOWPOSCHANGING, sent|wparam|defwinproc, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER }, { WM_WINDOWPOSCHANGING, sent|wparam|defwinproc, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER },
{ WM_NCCALCSIZE, sent|wparam|defwinproc, 1 }, { WM_NCCALCSIZE, sent|wparam|defwinproc, 1 },
{ WM_WINDOWPOSCHANGED, sent|wparam|defwinproc, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER|SWP_NOREDRAW|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, { WM_WINDOWPOSCHANGED, sent|wparam|defwinproc, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER|SWP_NOREDRAW|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE },
{ EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, /* MDI child */
/* in MDI frame */ /* in MDI frame */
{ WM_WINDOWPOSCHANGING, sent|wparam|defwinproc, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER }, { WM_WINDOWPOSCHANGING, sent|wparam|defwinproc, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER },
...@@ -1430,11 +1679,18 @@ static const struct message WmDestroyMDIchildVisibleMaxSeq1[] = { ...@@ -1430,11 +1679,18 @@ static const struct message WmDestroyMDIchildVisibleMaxSeq1[] = {
{ WM_NCCALCSIZE, sent|wparam|defwinproc, 1 }, { WM_NCCALCSIZE, sent|wparam|defwinproc, 1 },
{ WM_WINDOWPOSCHANGED, sent|wparam|defwinproc, SWP_NOACTIVATE|SWP_NOMOVE|SWP_NOZORDER|SWP_NOREDRAW|SWP_NOCLIENTMOVE }, { WM_WINDOWPOSCHANGED, sent|wparam|defwinproc, SWP_NOACTIVATE|SWP_NOMOVE|SWP_NOZORDER|SWP_NOREDRAW|SWP_NOCLIENTMOVE },
{ WM_SIZE, sent|defwinproc }, { 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 */
{ 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 */
/* in MDI frame */ /* in MDI frame */
{ WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER }, { WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER },
{ WM_NCCALCSIZE, sent|wparam, 1 }, { WM_NCCALCSIZE, sent|wparam, 1 },
{ WM_WINDOWPOSCHANGED, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, { WM_WINDOWPOSCHANGED, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE },
{ EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, /* MDI frame */
{ WM_NCACTIVATE, sent|wparam, 0 }, { WM_NCACTIVATE, sent|wparam, 0 },
{ WM_MDIACTIVATE, sent }, { WM_MDIACTIVATE, sent },
...@@ -1442,6 +1698,9 @@ static const struct message WmDestroyMDIchildVisibleMaxSeq1[] = { ...@@ -1442,6 +1698,9 @@ static const struct message WmDestroyMDIchildVisibleMaxSeq1[] = {
{ HCBT_MINMAX, hook }, { HCBT_MINMAX, hook },
{ WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|SWP_SHOWWINDOW|0x8000 }, { WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|SWP_SHOWWINDOW|0x8000 },
{ WM_NCCALCSIZE, sent|wparam, 1 }, { WM_NCCALCSIZE, sent|wparam, 1 },
{ EVENT_OBJECT_SHOW, winevent_hook|wparam|lparam, 0, 0 },
{ WM_CHILDACTIVATE, sent|wparam|lparam, 0, 0 }, { WM_CHILDACTIVATE, sent|wparam|lparam, 0, 0 },
{ WM_WINDOWPOSCHANGED, sent|wparam, SWP_FRAMECHANGED|SWP_SHOWWINDOW|SWP_NOMOVE|SWP_NOZORDER|SWP_NOCLIENTMOVE|0x8000 }, { WM_WINDOWPOSCHANGED, sent|wparam, SWP_FRAMECHANGED|SWP_SHOWWINDOW|SWP_NOMOVE|SWP_NOZORDER|SWP_NOCLIENTMOVE|0x8000 },
{ WM_SIZE, sent|defwinproc }, { WM_SIZE, sent|defwinproc },
...@@ -1450,6 +1709,7 @@ static const struct message WmDestroyMDIchildVisibleMaxSeq1[] = { ...@@ -1450,6 +1709,7 @@ static const struct message WmDestroyMDIchildVisibleMaxSeq1[] = {
{ WM_WINDOWPOSCHANGING, sent|wparam|defwinproc, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER }, { WM_WINDOWPOSCHANGING, sent|wparam|defwinproc, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER },
{ WM_NCCALCSIZE, sent|wparam|defwinproc, 1 }, { WM_NCCALCSIZE, sent|wparam|defwinproc, 1 },
{ WM_WINDOWPOSCHANGED, sent|wparam|defwinproc, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, { WM_WINDOWPOSCHANGED, sent|wparam|defwinproc, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE },
{ EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, /* MDI child */
/* in MDI frame */ /* in MDI frame */
{ WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER }, { WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER },
...@@ -1463,11 +1723,15 @@ static const struct message WmDestroyMDIchildVisibleMaxSeq1[] = { ...@@ -1463,11 +1723,15 @@ static const struct message WmDestroyMDIchildVisibleMaxSeq1[] = {
{ WM_NCCALCSIZE, sent|wparam, 1 }, { WM_NCCALCSIZE, sent|wparam, 1 },
{ WM_WINDOWPOSCHANGED, sent|wparam, SWP_NOACTIVATE|SWP_NOMOVE|SWP_NOZORDER|SWP_NOCLIENTMOVE }, { WM_WINDOWPOSCHANGED, sent|wparam, SWP_NOACTIVATE|SWP_NOMOVE|SWP_NOZORDER|SWP_NOCLIENTMOVE },
{ WM_SIZE, sent }, { WM_SIZE, sent },
{ 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 */
{ HCBT_SETFOCUS, hook }, { HCBT_SETFOCUS, hook },
{ WM_KILLFOCUS, sent }, { WM_KILLFOCUS, sent },
{ WM_IME_SETCONTEXT, sent|wparam|optional, 0 }, { WM_IME_SETCONTEXT, sent|wparam|optional, 0 },
{ WM_IME_SETCONTEXT, sent|wparam|optional, 1 }, /* in MDI client */ { WM_IME_SETCONTEXT, sent|wparam|optional, 1 }, /* in MDI client */
{ EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 },
{ WM_SETFOCUS, sent }, /* in MDI client */ { WM_SETFOCUS, sent }, /* in MDI client */
{ WM_MDIREFRESHMENU, sent }, /* in MDI client */ { WM_MDIREFRESHMENU, sent }, /* in MDI client */
...@@ -1482,9 +1746,11 @@ static const struct message WmDestroyMDIchildVisibleMaxSeq1[] = { ...@@ -1482,9 +1746,11 @@ static const struct message WmDestroyMDIchildVisibleMaxSeq1[] = {
{ WM_SHOWWINDOW, sent|wparam, 0 }, { WM_SHOWWINDOW, sent|wparam, 0 },
{ WM_WINDOWPOSCHANGING, sent|wparam, SWP_HIDEWINDOW|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER }, { WM_WINDOWPOSCHANGING, sent|wparam, SWP_HIDEWINDOW|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER },
{ EVENT_OBJECT_HIDE, winevent_hook|wparam|lparam, 0, 0 },
{ WM_ERASEBKGND, sent|parent|optional }, { WM_ERASEBKGND, sent|parent|optional },
{ WM_WINDOWPOSCHANGED, sent|wparam, SWP_HIDEWINDOW|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, { WM_WINDOWPOSCHANGED, sent|wparam, SWP_HIDEWINDOW|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE },
{ EVENT_OBJECT_DESTROY, winevent_hook|wparam|lparam, 0, 0 },
{ WM_DESTROY, sent }, { WM_DESTROY, sent },
{ WM_NCDESTROY, sent }, { WM_NCDESTROY, sent },
{ 0 } { 0 }
...@@ -1495,17 +1761,20 @@ static const struct message WmMaximizeMDIchildInvisibleSeq[] = { ...@@ -1495,17 +1761,20 @@ static const struct message WmMaximizeMDIchildInvisibleSeq[] = {
{ WM_GETMINMAXINFO, sent }, { WM_GETMINMAXINFO, sent },
{ WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_FRAMECHANGED|0x8000 }, { WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_FRAMECHANGED|0x8000 },
{ WM_NCCALCSIZE, sent|wparam, 1 }, { WM_NCCALCSIZE, sent|wparam, 1 },
{ EVENT_OBJECT_SHOW, winevent_hook|wparam|lparam, 0, 0 },
{ WM_CHILDACTIVATE, sent|wparam|lparam, 0, 0 }, { WM_CHILDACTIVATE, sent|wparam|lparam, 0, 0 },
{ WM_WINDOWPOSCHANGING, sent|wparam|defwinproc, SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE }, { WM_WINDOWPOSCHANGING, sent|wparam|defwinproc, SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE },
{ WM_NCACTIVATE, sent|wparam|defwinproc, 1 }, { WM_NCACTIVATE, sent|wparam|defwinproc, 1 },
{ HCBT_SETFOCUS, hook }, { HCBT_SETFOCUS, hook },
{ WM_IME_SETCONTEXT, sent|wparam|optional, 1 }, /* in MDI client */ { WM_IME_SETCONTEXT, sent|wparam|optional, 1 }, /* in MDI client */
{ EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 },
{ WM_SETFOCUS, sent }, /* in MDI client */ { WM_SETFOCUS, sent }, /* in MDI client */
{ HCBT_SETFOCUS, hook }, { HCBT_SETFOCUS, hook },
{ WM_KILLFOCUS, sent }, /* in MDI client */ { WM_KILLFOCUS, sent }, /* in MDI client */
{ WM_IME_SETCONTEXT, sent|wparam|optional, 0 }, /* in MDI client */ { WM_IME_SETCONTEXT, sent|wparam|optional, 0 }, /* in MDI client */
{ WM_IME_SETCONTEXT, sent|wparam|defwinproc|optional, 1 }, { WM_IME_SETCONTEXT, sent|wparam|defwinproc|optional, 1 },
{ EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 },
{ WM_SETFOCUS, sent|defwinproc }, { WM_SETFOCUS, sent|defwinproc },
{ WM_MDIACTIVATE, sent|defwinproc }, { WM_MDIACTIVATE, sent|defwinproc },
{ WM_WINDOWPOSCHANGED, sent|wparam, SWP_SHOWWINDOW|SWP_FRAMECHANGED|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE|0x8000 }, { WM_WINDOWPOSCHANGED, sent|wparam, SWP_SHOWWINDOW|SWP_FRAMECHANGED|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE|0x8000 },
...@@ -1514,6 +1783,8 @@ static const struct message WmMaximizeMDIchildInvisibleSeq[] = { ...@@ -1514,6 +1783,8 @@ static const struct message WmMaximizeMDIchildInvisibleSeq[] = {
{ WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER }, { WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER },
{ WM_NCCALCSIZE, sent|wparam, 1 }, { WM_NCCALCSIZE, sent|wparam, 1 },
{ WM_WINDOWPOSCHANGED, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, { WM_WINDOWPOSCHANGED, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE },
{ EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, /* MDI frame */
{ EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, /* MDI child */
{ 0 } { 0 }
}; };
/* ShowWindow(SW_MAXIMIZE) for a visible MDI child window */ /* ShowWindow(SW_MAXIMIZE) for a visible MDI child window */
...@@ -1529,6 +1800,8 @@ static const struct message WmMaximizeMDIchildVisibleSeq[] = { ...@@ -1529,6 +1800,8 @@ static const struct message WmMaximizeMDIchildVisibleSeq[] = {
{ WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER }, { WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER },
{ WM_NCCALCSIZE, sent|wparam, 1 }, { WM_NCCALCSIZE, sent|wparam, 1 },
{ WM_WINDOWPOSCHANGED, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, { WM_WINDOWPOSCHANGED, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE },
{ EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, /* MDI frame */
{ EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, /* MDI child */
{ 0 } { 0 }
}; };
/* ShowWindow(SW_RESTORE) for a visible MDI child window */ /* ShowWindow(SW_RESTORE) for a visible MDI child window */
...@@ -1543,6 +1816,8 @@ static const struct message WmRestoreMDIchildVisibleSeq[] = { ...@@ -1543,6 +1816,8 @@ static const struct message WmRestoreMDIchildVisibleSeq[] = {
{ WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER }, { WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER },
{ WM_NCCALCSIZE, sent|wparam, 1 }, { WM_NCCALCSIZE, sent|wparam, 1 },
{ WM_WINDOWPOSCHANGED, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, { WM_WINDOWPOSCHANGED, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE },
{ EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, /* MDI frame */
{ EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, /* MDI child */
{ 0 } { 0 }
}; };
/* ShowWindow(SW_RESTORE) for a not visible MDI child window */ /* ShowWindow(SW_RESTORE) for a not visible MDI child window */
...@@ -1550,6 +1825,7 @@ static const struct message WmRestoreMDIchildInisibleSeq[] = { ...@@ -1550,6 +1825,7 @@ static const struct message WmRestoreMDIchildInisibleSeq[] = {
{ HCBT_MINMAX, hook }, { HCBT_MINMAX, hook },
{ WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_FRAMECHANGED|0x8000 }, { WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_FRAMECHANGED|0x8000 },
{ WM_NCCALCSIZE, sent|wparam, 1 }, { WM_NCCALCSIZE, sent|wparam, 1 },
{ EVENT_OBJECT_SHOW, winevent_hook|wparam|lparam, 0, 0 },
{ WM_CHILDACTIVATE, sent|wparam|lparam, 0, 0 }, { WM_CHILDACTIVATE, sent|wparam|lparam, 0, 0 },
{ WM_WINDOWPOSCHANGED, sent|wparam, SWP_SHOWWINDOW|SWP_FRAMECHANGED|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE|0x8000 }, { WM_WINDOWPOSCHANGED, sent|wparam, SWP_SHOWWINDOW|SWP_FRAMECHANGED|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE|0x8000 },
{ WM_SIZE, sent|defwinproc }, { WM_SIZE, sent|defwinproc },
...@@ -1557,6 +1833,8 @@ static const struct message WmRestoreMDIchildInisibleSeq[] = { ...@@ -1557,6 +1833,8 @@ static const struct message WmRestoreMDIchildInisibleSeq[] = {
{ WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER }, { WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER },
{ WM_NCCALCSIZE, sent|wparam, 1 }, { WM_NCCALCSIZE, sent|wparam, 1 },
{ WM_WINDOWPOSCHANGED, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, { WM_WINDOWPOSCHANGED, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE },
{ EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, /* MDI frame */
{ EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, /* MDI child */
{ 0 } { 0 }
}; };
...@@ -1571,6 +1849,7 @@ static LRESULT WINAPI mdi_client_hook_proc(HWND hwnd, UINT message, WPARAM wPara ...@@ -1571,6 +1849,7 @@ static LRESULT WINAPI mdi_client_hook_proc(HWND hwnd, UINT message, WPARAM wPara
if (message != WM_PAINT && if (message != WM_PAINT &&
message != WM_ERASEBKGND && message != WM_ERASEBKGND &&
message != WM_NCPAINT && message != WM_NCPAINT &&
message != WM_NCHITTEST &&
message != WM_GETTEXT && message != WM_GETTEXT &&
message != WM_MDIGETACTIVE) message != WM_MDIGETACTIVE)
{ {
...@@ -1616,6 +1895,7 @@ static LRESULT WINAPI mdi_child_wnd_proc(HWND hwnd, UINT message, WPARAM wParam, ...@@ -1616,6 +1895,7 @@ static LRESULT WINAPI mdi_child_wnd_proc(HWND hwnd, UINT message, WPARAM wParam,
if (message != WM_PAINT && if (message != WM_PAINT &&
message != WM_ERASEBKGND && message != WM_ERASEBKGND &&
message != WM_NCPAINT && message != WM_NCPAINT &&
message != WM_NCHITTEST &&
message != WM_GETTEXT) message != WM_GETTEXT)
{ {
trace("mdi child: %p, %04x, %08x, %08lx\n", hwnd, message, wParam, lParam); trace("mdi child: %p, %04x, %08x, %08lx\n", hwnd, message, wParam, lParam);
...@@ -1678,6 +1958,7 @@ static LRESULT WINAPI mdi_frame_wnd_proc(HWND hwnd, UINT message, WPARAM wParam, ...@@ -1678,6 +1958,7 @@ static LRESULT WINAPI mdi_frame_wnd_proc(HWND hwnd, UINT message, WPARAM wParam,
if (message != WM_PAINT && if (message != WM_PAINT &&
message != WM_ERASEBKGND && message != WM_ERASEBKGND &&
message != WM_NCPAINT && message != WM_NCPAINT &&
message != WM_NCHITTEST &&
message != WM_GETTEXT) message != WM_GETTEXT)
{ {
trace("mdi frame: %p, %04x, %08x, %08lx\n", hwnd, message, wParam, lParam); trace("mdi frame: %p, %04x, %08x, %08lx\n", hwnd, message, wParam, lParam);
...@@ -2153,6 +2434,26 @@ static INT_PTR CALLBACK TestModalDlgProcA(HWND hwnd, UINT message, WPARAM wParam ...@@ -2153,6 +2434,26 @@ static INT_PTR CALLBACK TestModalDlgProcA(HWND hwnd, UINT message, WPARAM wParam
trace("dialog: %p, %04x, %08x, %08lx\n", hwnd, message, wParam, lParam); trace("dialog: %p, %04x, %08x, %08lx\n", hwnd, message, wParam, lParam);
switch (message)
{
case WM_WINDOWPOSCHANGING:
case WM_WINDOWPOSCHANGED:
{
WINDOWPOS *winpos = (WINDOWPOS *)lParam;
trace("%s\n", (message == WM_WINDOWPOSCHANGING) ? "WM_WINDOWPOSCHANGING" : "WM_WINDOWPOSCHANGED");
trace("%p after %p, x %d, y %d, cx %d, cy %d flags %08x\n",
winpos->hwnd, winpos->hwndInsertAfter,
winpos->x, winpos->y, winpos->cx, winpos->cy, winpos->flags);
/* Log only documented flags, win2k uses 0x1000 and 0x2000
* in the high word for internal purposes
*/
wParam = winpos->flags & 0xffff;
break;
}
}
msg.message = message; msg.message = message;
msg.flags = sent|wparam|lparam; msg.flags = sent|wparam|lparam;
msg.wParam = wParam; msg.wParam = wParam;
...@@ -2192,14 +2493,14 @@ static void test_hv_scroll_1(HWND hwnd, INT ctl, DWORD clear, DWORD set, INT min ...@@ -2192,14 +2493,14 @@ static void test_hv_scroll_1(HWND hwnd, INT ctl, DWORD clear, DWORD set, INT min
/* a subsequent call should do nothing */ /* a subsequent call should do nothing */
ret = SetScrollRange(hwnd, ctl, min, max, FALSE); ret = SetScrollRange(hwnd, ctl, min, max, FALSE);
ok( ret, "SetScrollRange(%d) error %ld\n", ctl, GetLastError()); ok( ret, "SetScrollRange(%d) error %ld\n", ctl, GetLastError());
ok_sequence(WmEmptySeq, "SetScrollRange(SB_HORZ/SB_VERT)", FALSE); ok_sequence(WmEmptySeq, "SetScrollRange(SB_HORZ/SB_VERT) empty sequence", FALSE);
xmin = 0xdeadbeef; xmin = 0xdeadbeef;
xmax = 0xdeadbeef; xmax = 0xdeadbeef;
trace("Ignore GetScrollRange error below if you are on Win9x\n"); trace("Ignore GetScrollRange error below if you are on Win9x\n");
ret = GetScrollRange(hwnd, ctl, &xmin, &xmax); ret = GetScrollRange(hwnd, ctl, &xmin, &xmax);
ok( ret, "GetScrollRange(%d) error %ld\n", ctl, GetLastError()); ok( ret, "GetScrollRange(%d) error %ld\n", ctl, GetLastError());
ok_sequence(WmEmptySeq, "GetScrollRange(SB_HORZ/SB_VERT)", FALSE); ok_sequence(WmEmptySeq, "GetScrollRange(SB_HORZ/SB_VERT) empty sequence", FALSE);
ok(xmin == min, "unexpected min scroll value %d\n", xmin); ok(xmin == min, "unexpected min scroll value %d\n", xmin);
ok(xmax == max, "unexpected max scroll value %d\n", xmax); ok(xmax == max, "unexpected max scroll value %d\n", xmax);
} }
...@@ -2234,24 +2535,29 @@ static void test_hv_scroll_2(HWND hwnd, INT ctl, DWORD clear, DWORD set, INT min ...@@ -2234,24 +2535,29 @@ static void test_hv_scroll_2(HWND hwnd, INT ctl, DWORD clear, DWORD set, INT min
/* a subsequent call should do nothing */ /* a subsequent call should do nothing */
SetScrollInfo(hwnd, ctl, &si, TRUE); SetScrollInfo(hwnd, ctl, &si, TRUE);
ok_sequence(WmEmptySeq, "SetScrollInfo(SB_HORZ/SB_VERT)", FALSE); if (style & WS_HSCROLL)
ok_sequence(WmSetScrollRangeHSeq_empty, "SetScrollInfo(SB_HORZ/SB_VERT) empty sequence", FALSE);
else if (style & WS_VSCROLL)
ok_sequence(WmSetScrollRangeVSeq_empty, "SetScrollInfo(SB_HORZ/SB_VERT) empty sequence", FALSE);
else
ok_sequence(WmEmptySeq, "SetScrollInfo(SB_HORZ/SB_VERT) empty sequence", FALSE);
si.fMask = SIF_PAGE; si.fMask = SIF_PAGE;
si.nPage = 5; si.nPage = 5;
SetScrollInfo(hwnd, ctl, &si, FALSE); SetScrollInfo(hwnd, ctl, &si, FALSE);
ok_sequence(WmEmptySeq, "SetScrollInfo(SB_HORZ/SB_VERT)", FALSE); ok_sequence(WmEmptySeq, "SetScrollInfo(SB_HORZ/SB_VERT) empty sequence", FALSE);
si.fMask = SIF_POS; si.fMask = SIF_POS;
si.nPos = max - 1; si.nPos = max - 1;
SetScrollInfo(hwnd, ctl, &si, FALSE); SetScrollInfo(hwnd, ctl, &si, FALSE);
ok_sequence(WmEmptySeq, "SetScrollInfo(SB_HORZ/SB_VERT)", FALSE); ok_sequence(WmEmptySeq, "SetScrollInfo(SB_HORZ/SB_VERT) empty sequence", FALSE);
si.fMask = SIF_RANGE; si.fMask = SIF_RANGE;
si.nMin = 0xdeadbeef; si.nMin = 0xdeadbeef;
si.nMax = 0xdeadbeef; si.nMax = 0xdeadbeef;
ret = GetScrollInfo(hwnd, ctl, &si); ret = GetScrollInfo(hwnd, ctl, &si);
ok( ret, "GetScrollInfo error %ld\n", GetLastError()); ok( ret, "GetScrollInfo error %ld\n", GetLastError());
ok_sequence(WmEmptySeq, "GetScrollRange(SB_HORZ/SB_VERT)", FALSE); ok_sequence(WmEmptySeq, "GetScrollRange(SB_HORZ/SB_VERT) empty sequence", FALSE);
ok(si.nMin == min, "unexpected min scroll value %d\n", si.nMin); ok(si.nMin == min, "unexpected min scroll value %d\n", si.nMin);
ok(si.nMax == max, "unexpected max scroll value %d\n", si.nMax); ok(si.nMax == max, "unexpected max scroll value %d\n", si.nMax);
} }
...@@ -2518,8 +2824,10 @@ static void test_messages(void) ...@@ -2518,8 +2824,10 @@ static void test_messages(void)
ok(hwnd != 0, "Failed to create custom dialog window\n"); ok(hwnd != 0, "Failed to create custom dialog window\n");
ok_sequence(WmCreateCustomDialogSeq, "CreateCustomDialog", TRUE); ok_sequence(WmCreateCustomDialogSeq, "CreateCustomDialog", TRUE);
/*
trace("testing scroll APIs on a visible dialog %p\n", hwnd); trace("testing scroll APIs on a visible dialog %p\n", hwnd);
test_scroll_messages(hwnd); test_scroll_messages(hwnd);
*/
flush_sequence(); flush_sequence();
after_end_dialog = 1; after_end_dialog = 1;
...@@ -2529,6 +2837,15 @@ static void test_messages(void) ...@@ -2529,6 +2837,15 @@ static void test_messages(void)
DestroyWindow(hwnd); DestroyWindow(hwnd);
after_end_dialog = 0; after_end_dialog = 0;
hwnd = CreateWindowExA(0, "TestDialogClass", NULL, WS_POPUP,
0, 0, 100, 100, 0, 0, GetModuleHandleA(0), NULL);
ok(hwnd != 0, "Failed to create custom dialog window\n");
flush_sequence();
trace("call ShowWindow(%p, SW_SHOW)\n", hwnd);
ShowWindow(hwnd, SW_SHOW);
ok_sequence(WmShowCustomDialogSeq, "ShowCustomDialog", TRUE);
DestroyWindow(hwnd);
flush_sequence(); flush_sequence();
DialogBoxA( 0, "TEST_DIALOG", hparent, TestModalDlgProcA ); DialogBoxA( 0, "TEST_DIALOG", hparent, TestModalDlgProcA );
ok_sequence(WmModalDialogSeq, "ModalDialog", TRUE); ok_sequence(WmModalDialogSeq, "ModalDialog", TRUE);
...@@ -2609,13 +2926,15 @@ static void test_messages(void) ...@@ -2609,13 +2926,15 @@ static void test_messages(void)
while (PeekMessage( &msg, 0, 0, 0, PM_REMOVE )) DispatchMessage( &msg ); while (PeekMessage( &msg, 0, 0, 0, PM_REMOVE )) DispatchMessage( &msg );
flush_sequence(); flush_sequence();
PostMessage( hparent, WM_USER, 0, 0 );
PostMessage( hparent, WM_USER+1, 0, 0 ); /* the following test causes an exception in user.exe under win9x */
if (!PostMessageW( hparent, WM_USER, 0, 0 )) return;
PostMessageW( hparent, WM_USER+1, 0, 0 );
/* PeekMessage(NULL) fails, but still removes the message */ /* PeekMessage(NULL) fails, but still removes the message */
SetLastError(0xdeadbeef); SetLastError(0xdeadbeef);
ok( !PeekMessage( NULL, 0, 0, 0, PM_REMOVE ), "PeekMessage(NULL) should fail\n" ); ok( !PeekMessageW( NULL, 0, 0, 0, PM_REMOVE ), "PeekMessage(NULL) should fail\n" );
ok( GetLastError() == ERROR_NOACCESS, "last error is %ld\n", GetLastError() ); ok( GetLastError() == ERROR_NOACCESS, "last error is %ld\n", GetLastError() );
ok( PeekMessage( &msg, 0, 0, 0, PM_REMOVE ), "PeekMessage should succeed\n" ); ok( PeekMessageW( &msg, 0, 0, 0, PM_REMOVE ), "PeekMessage should succeed\n" );
ok( msg.message == WM_USER+1, "got %x instead of WM_USER+1\n", msg.message ); ok( msg.message == WM_USER+1, "got %x instead of WM_USER+1\n", msg.message );
DestroyWindow(hchild); DestroyWindow(hchild);
...@@ -2628,6 +2947,7 @@ static const struct message WmSetFocusButtonSeq[] = ...@@ -2628,6 +2947,7 @@ static const struct message WmSetFocusButtonSeq[] =
{ {
{ HCBT_SETFOCUS, hook }, { HCBT_SETFOCUS, hook },
{ WM_IME_SETCONTEXT, sent|wparam|optional, 1 }, { WM_IME_SETCONTEXT, sent|wparam|optional, 1 },
{ EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 },
{ WM_SETFOCUS, sent|wparam, 0 }, { WM_SETFOCUS, sent|wparam, 0 },
{ WM_CTLCOLORBTN, sent|defwinproc }, { WM_CTLCOLORBTN, sent|defwinproc },
{ 0 } { 0 }
...@@ -2635,6 +2955,7 @@ static const struct message WmSetFocusButtonSeq[] = ...@@ -2635,6 +2955,7 @@ static const struct message WmSetFocusButtonSeq[] =
static const struct message WmKillFocusButtonSeq[] = static const struct message WmKillFocusButtonSeq[] =
{ {
{ HCBT_SETFOCUS, hook }, { HCBT_SETFOCUS, hook },
{ EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 },
{ WM_KILLFOCUS, sent|wparam, 0 }, { WM_KILLFOCUS, sent|wparam, 0 },
{ WM_CTLCOLORBTN, sent|defwinproc }, { WM_CTLCOLORBTN, sent|defwinproc },
{ WM_IME_SETCONTEXT, sent|wparam|optional, 0 }, { WM_IME_SETCONTEXT, sent|wparam|optional, 0 },
...@@ -2644,6 +2965,7 @@ static const struct message WmSetFocusStaticSeq[] = ...@@ -2644,6 +2965,7 @@ static const struct message WmSetFocusStaticSeq[] =
{ {
{ HCBT_SETFOCUS, hook }, { HCBT_SETFOCUS, hook },
{ WM_IME_SETCONTEXT, sent|wparam|optional, 1 }, { WM_IME_SETCONTEXT, sent|wparam|optional, 1 },
{ EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 },
{ WM_SETFOCUS, sent|wparam, 0 }, { WM_SETFOCUS, sent|wparam, 0 },
{ WM_CTLCOLORSTATIC, sent|defwinproc }, { WM_CTLCOLORSTATIC, sent|defwinproc },
{ 0 } { 0 }
...@@ -2651,6 +2973,7 @@ static const struct message WmSetFocusStaticSeq[] = ...@@ -2651,6 +2973,7 @@ static const struct message WmSetFocusStaticSeq[] =
static const struct message WmKillFocusStaticSeq[] = static const struct message WmKillFocusStaticSeq[] =
{ {
{ HCBT_SETFOCUS, hook }, { HCBT_SETFOCUS, hook },
{ EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 },
{ WM_KILLFOCUS, sent|wparam, 0 }, { WM_KILLFOCUS, sent|wparam, 0 },
{ WM_CTLCOLORSTATIC, sent|defwinproc }, { WM_CTLCOLORSTATIC, sent|defwinproc },
{ WM_IME_SETCONTEXT, sent|wparam|optional, 0 }, { WM_IME_SETCONTEXT, sent|wparam|optional, 0 },
...@@ -2659,12 +2982,15 @@ static const struct message WmKillFocusStaticSeq[] = ...@@ -2659,12 +2982,15 @@ static const struct message WmKillFocusStaticSeq[] =
static const struct message WmLButtonDownSeq[] = static const struct message WmLButtonDownSeq[] =
{ {
{ WM_LBUTTONDOWN, sent|wparam|lparam, 0, 0 }, { WM_LBUTTONDOWN, sent|wparam|lparam, 0, 0 },
{ EVENT_SYSTEM_CAPTURESTART, winevent_hook|wparam|lparam, 0, 0 },
{ HCBT_SETFOCUS, hook }, { HCBT_SETFOCUS, hook },
{ WM_IME_SETCONTEXT, sent|wparam|defwinproc|optional, 1 }, { WM_IME_SETCONTEXT, sent|wparam|defwinproc|optional, 1 },
{ EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 },
{ WM_SETFOCUS, sent|wparam|defwinproc, 0 }, { WM_SETFOCUS, sent|wparam|defwinproc, 0 },
{ WM_CTLCOLORBTN, sent|defwinproc }, { WM_CTLCOLORBTN, sent|defwinproc },
{ BM_SETSTATE, sent|wparam|defwinproc, TRUE }, { BM_SETSTATE, sent|wparam|defwinproc, TRUE },
{ WM_CTLCOLORBTN, sent|defwinproc }, { WM_CTLCOLORBTN, sent|defwinproc },
{ EVENT_OBJECT_STATECHANGE, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 },
{ 0 } { 0 }
}; };
static const struct message WmLButtonUpSeq[] = static const struct message WmLButtonUpSeq[] =
...@@ -2672,6 +2998,8 @@ static const struct message WmLButtonUpSeq[] = ...@@ -2672,6 +2998,8 @@ static const struct message WmLButtonUpSeq[] =
{ WM_LBUTTONUP, sent|wparam|lparam, 0, 0 }, { WM_LBUTTONUP, sent|wparam|lparam, 0, 0 },
{ BM_SETSTATE, sent|wparam|defwinproc, FALSE }, { BM_SETSTATE, sent|wparam|defwinproc, FALSE },
{ WM_CTLCOLORBTN, sent|defwinproc }, { WM_CTLCOLORBTN, sent|defwinproc },
{ EVENT_OBJECT_STATECHANGE, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 },
{ EVENT_SYSTEM_CAPTUREEND, winevent_hook|wparam|lparam, 0, 0 },
{ WM_CAPTURECHANGED, sent|wparam|defwinproc, 0 }, { WM_CAPTURECHANGED, sent|wparam|defwinproc, 0 },
{ 0 } { 0 }
}; };
...@@ -2790,7 +3118,7 @@ static void test_button_messages(void) ...@@ -2790,7 +3118,7 @@ static void test_button_messages(void)
ok_sequence(WmLButtonDownSeq, "WM_LBUTTONDOWN on a button", FALSE); ok_sequence(WmLButtonDownSeq, "WM_LBUTTONDOWN on a button", FALSE);
SendMessageA(hwnd, WM_LBUTTONUP, 0, 0); SendMessageA(hwnd, WM_LBUTTONUP, 0, 0);
ok_sequence(WmLButtonUpSeq, "WM_LBUTTONDOWN on a button", FALSE); ok_sequence(WmLButtonUpSeq, "WM_LBUTTONUP on a button", FALSE);
DestroyWindow(hwnd); DestroyWindow(hwnd);
} }
...@@ -3491,11 +3819,14 @@ static const struct message WmAltVkN[] = { ...@@ -3491,11 +3819,14 @@ static const struct message WmAltVkN[] = {
{ WM_SYSCOMMAND, sent|defwinproc|wparam|lparam, SC_KEYMENU, 'n' }, { WM_SYSCOMMAND, sent|defwinproc|wparam|lparam, SC_KEYMENU, 'n' },
{ HCBT_SYSCOMMAND, hook }, { HCBT_SYSCOMMAND, hook },
{ WM_ENTERMENULOOP, sent|defwinproc|wparam|lparam, 0, 0 }, { WM_ENTERMENULOOP, sent|defwinproc|wparam|lparam, 0, 0 },
{ WM_SETCURSOR, sent|defwinproc }, { EVENT_SYSTEM_CAPTURESTART, winevent_hook|wparam|lparam, 0, 0 },
{ WM_INITMENU, sent|defwinproc }, { WM_INITMENU, sent|defwinproc },
{ EVENT_SYSTEM_MENUSTART, winevent_hook|wparam|lparam, OBJID_SYSMENU, 0 },
{ WM_MENUCHAR, sent|defwinproc|wparam, MAKEWPARAM('n',MF_SYSMENU) }, { WM_MENUCHAR, sent|defwinproc|wparam, MAKEWPARAM('n',MF_SYSMENU) },
{ EVENT_SYSTEM_CAPTUREEND, winevent_hook|wparam|lparam, 0, 0 },
{ WM_CAPTURECHANGED, sent|defwinproc }, { WM_CAPTURECHANGED, sent|defwinproc },
{ WM_MENUSELECT, sent|defwinproc|wparam, MAKEWPARAM(0,0xffff) }, { WM_MENUSELECT, sent|defwinproc|wparam, MAKEWPARAM(0,0xffff) },
{ EVENT_SYSTEM_MENUEND, winevent_hook|wparam|lparam, OBJID_SYSMENU, 0 },
{ WM_EXITMENULOOP, sent|defwinproc }, { WM_EXITMENULOOP, sent|defwinproc },
{ WM_MENUSELECT, sent|defwinproc|wparam|optional, MAKEWPARAM(0,0xffff) }, /* Win95 bug */ { WM_MENUSELECT, sent|defwinproc|wparam|optional, MAKEWPARAM(0,0xffff) }, /* Win95 bug */
{ WM_EXITMENULOOP, sent|defwinproc|optional }, /* Win95 bug */ { WM_EXITMENULOOP, sent|defwinproc|optional }, /* Win95 bug */
...@@ -3687,6 +4018,11 @@ static LRESULT WINAPI MsgCheckProcA(HWND hwnd, UINT message, WPARAM wParam, LPAR ...@@ -3687,6 +4018,11 @@ static LRESULT WINAPI MsgCheckProcA(HWND hwnd, UINT message, WPARAM wParam, LPAR
LRESULT ret; LRESULT ret;
struct message msg; struct message msg;
/* do not log mouse messages */
if (message == WM_NCHITTEST ||
message == WM_SETCURSOR)
return 0;
trace("%p, %04x, %08x, %08lx\n", hwnd, message, wParam, lParam); trace("%p, %04x, %08x, %08lx\n", hwnd, message, wParam, lParam);
switch (message) switch (message)
...@@ -3844,6 +4180,26 @@ static LRESULT WINAPI TestDlgProcA(HWND hwnd, UINT message, WPARAM wParam, LPARA ...@@ -3844,6 +4180,26 @@ static LRESULT WINAPI TestDlgProcA(HWND hwnd, UINT message, WPARAM wParam, LPARA
else else
ok(HIWORD(ret) == DC_HASDEFID, "DM_GETDEFID should return DC_HASDEFID, got %lx\n", ret); ok(HIWORD(ret) == DC_HASDEFID, "DM_GETDEFID should return DC_HASDEFID, got %lx\n", ret);
switch (message)
{
case WM_WINDOWPOSCHANGING:
case WM_WINDOWPOSCHANGED:
{
WINDOWPOS *winpos = (WINDOWPOS *)lParam;
trace("%s\n", (message == WM_WINDOWPOSCHANGING) ? "WM_WINDOWPOSCHANGING" : "WM_WINDOWPOSCHANGED");
trace("%p after %p, x %d, y %d, cx %d, cy %d flags %08x\n",
winpos->hwnd, winpos->hwndInsertAfter,
winpos->x, winpos->y, winpos->cx, winpos->cy, winpos->flags);
/* Log only documented flags, win2k uses 0x1000 and 0x2000
* in the high word for internal purposes
*/
wParam = winpos->flags & 0xffff;
break;
}
}
msg.message = message; msg.message = message;
msg.flags = sent|wparam|lparam; msg.flags = sent|wparam|lparam;
if (defwndproc_counter) msg.flags |= defwinproc; if (defwndproc_counter) msg.flags |= defwinproc;
...@@ -3887,6 +4243,9 @@ static BOOL RegisterWindowClasses(void) ...@@ -3887,6 +4243,9 @@ static BOOL RegisterWindowClasses(void)
if(!RegisterClassA(&cls)) return FALSE; if(!RegisterClassA(&cls)) return FALSE;
ok(GetClassInfoA(0, "#32770", &cls), "GetClassInfo failed\n"); ok(GetClassInfoA(0, "#32770", &cls), "GetClassInfo failed\n");
cls.style = 0;
cls.hInstance = GetModuleHandleA(0);
cls.hbrBackground = 0;
cls.lpfnWndProc = TestDlgProcA; cls.lpfnWndProc = TestDlgProcA;
cls.lpszClassName = "TestDialogClass"; cls.lpszClassName = "TestDialogClass";
if(!RegisterClassA(&cls)) return FALSE; if(!RegisterClassA(&cls)) return FALSE;
...@@ -3934,7 +4293,7 @@ static LRESULT CALLBACK cbt_hook_proc(int nCode, WPARAM wParam, LPARAM lParam) ...@@ -3934,7 +4293,7 @@ static LRESULT CALLBACK cbt_hook_proc(int nCode, WPARAM wParam, LPARAM lParam)
struct message msg; struct message msg;
msg.message = nCode; msg.message = nCode;
msg.flags = hook; msg.flags = hook|wparam|lparam;
msg.wParam = wParam; msg.wParam = wParam;
msg.lParam = lParam; msg.lParam = lParam;
add_message(&msg); add_message(&msg);
...@@ -3943,6 +4302,47 @@ static LRESULT CALLBACK cbt_hook_proc(int nCode, WPARAM wParam, LPARAM lParam) ...@@ -3943,6 +4302,47 @@ static LRESULT CALLBACK cbt_hook_proc(int nCode, WPARAM wParam, LPARAM lParam)
return CallNextHookEx(hCBT_hook, nCode, wParam, lParam); return CallNextHookEx(hCBT_hook, nCode, wParam, lParam);
} }
static void CALLBACK win_event_proc(HWINEVENTHOOK hevent,
DWORD event,
HWND hwnd,
LONG object_id,
LONG child_id,
DWORD thread_id,
DWORD event_time)
{
char buf[256];
trace("WEH:%p,event %08lx,hwnd %p,obj %08lx,id %08lx,thread %08lx,time %08lx\n",
hevent, event, hwnd, object_id, child_id, thread_id, event_time);
/* ignore mouse cursor events */
if (object_id == OBJID_CURSOR) return;
if (!hwnd || GetClassNameA(hwnd, buf, sizeof(buf)))
{
if (!hwnd ||
!strcmp(buf, "TestWindowClass") ||
!strcmp(buf, "TestParentClass") ||
!strcmp(buf, "TestPopupClass") ||
!strcmp(buf, "SimpleWindowClass") ||
!strcmp(buf, "TestDialogClass") ||
!strcmp(buf, "MDI_frame_class") ||
!strcmp(buf, "MDI_client_class") ||
!strcmp(buf, "MDI_child_class") ||
!strcmp(buf, "my_button_class") ||
!strcmp(buf, "#32770"))
{
struct message msg;
msg.message = event;
msg.flags = winevent_hook|wparam|lparam;
msg.wParam = object_id;
msg.lParam = child_id;
add_message(&msg);
}
}
}
static const WCHAR wszUnicode[] = {'U','n','i','c','o','d','e',0}; static const WCHAR wszUnicode[] = {'U','n','i','c','o','d','e',0};
static const WCHAR wszAnsi[] = {'U',0}; static const WCHAR wszAnsi[] = {'U',0};
...@@ -4100,10 +4500,91 @@ static void test_timers(void) ...@@ -4100,10 +4500,91 @@ static void test_timers(void)
ok(DestroyWindow(info.hWnd), "failed to destroy window\n"); ok(DestroyWindow(info.hWnd), "failed to destroy window\n");
} }
/* Various win events with arbitrary parameters */
static const struct message WmWinEventsSeq[] = {
{ EVENT_SYSTEM_SOUND, winevent_hook|wparam|lparam, OBJID_WINDOW, 0 },
{ EVENT_SYSTEM_ALERT, winevent_hook|wparam|lparam, OBJID_SYSMENU, 1 },
{ EVENT_SYSTEM_FOREGROUND, winevent_hook|wparam|lparam, OBJID_TITLEBAR, 2 },
{ EVENT_SYSTEM_MENUSTART, winevent_hook|wparam|lparam, OBJID_MENU, 3 },
{ EVENT_SYSTEM_MENUEND, winevent_hook|wparam|lparam, OBJID_CLIENT, 4 },
{ EVENT_SYSTEM_MENUPOPUPSTART, winevent_hook|wparam|lparam, OBJID_VSCROLL, 5 },
{ EVENT_SYSTEM_MENUPOPUPEND, winevent_hook|wparam|lparam, OBJID_HSCROLL, 6 },
{ EVENT_SYSTEM_CAPTURESTART, winevent_hook|wparam|lparam, OBJID_SIZEGRIP, 7 },
{ EVENT_SYSTEM_CAPTUREEND, winevent_hook|wparam|lparam, OBJID_CARET, 8 },
/* our win event hook ignores OBJID_CURSOR events */
/*{ EVENT_SYSTEM_MOVESIZESTART, winevent_hook|wparam|lparam, OBJID_CURSOR, 9 },*/
{ EVENT_SYSTEM_MOVESIZEEND, winevent_hook|wparam|lparam, OBJID_ALERT, 10 },
{ EVENT_SYSTEM_CONTEXTHELPSTART, winevent_hook|wparam|lparam, OBJID_SOUND, 11 },
{ EVENT_SYSTEM_CONTEXTHELPEND, winevent_hook|wparam|lparam, OBJID_QUERYCLASSNAMEIDX, 12 },
{ EVENT_SYSTEM_DRAGDROPSTART, winevent_hook|wparam|lparam, OBJID_NATIVEOM, 13 },
{ EVENT_SYSTEM_DRAGDROPEND, winevent_hook|wparam|lparam, OBJID_WINDOW, 0 },
{ EVENT_SYSTEM_DIALOGSTART, winevent_hook|wparam|lparam, OBJID_SYSMENU, 1 },
{ EVENT_SYSTEM_DIALOGEND, winevent_hook|wparam|lparam, OBJID_TITLEBAR, 2 },
{ EVENT_SYSTEM_SCROLLINGSTART, winevent_hook|wparam|lparam, OBJID_MENU, 3 },
{ EVENT_SYSTEM_SCROLLINGEND, winevent_hook|wparam|lparam, OBJID_CLIENT, 4 },
{ EVENT_SYSTEM_SWITCHSTART, winevent_hook|wparam|lparam, OBJID_VSCROLL, 5 },
{ EVENT_SYSTEM_SWITCHEND, winevent_hook|wparam|lparam, OBJID_HSCROLL, 6 },
{ EVENT_SYSTEM_MINIMIZESTART, winevent_hook|wparam|lparam, OBJID_SIZEGRIP, 7 },
{ EVENT_SYSTEM_MINIMIZEEND, winevent_hook|wparam|lparam, OBJID_CARET, 8 },
{ 0 }
};
static void test_winevents(void)
{
HWND hwnd;
UINT i;
const struct message *events = WmWinEventsSeq;
HMODULE user32 = GetModuleHandleA("user32.dll");
FARPROC pNotifyWinEvent = GetProcAddress(user32, "NotifyWinEvent");
if (!pNotifyWinEvent) return;
hwnd = CreateWindow ("TestWindowClass", NULL,
WS_OVERLAPPEDWINDOW,
CW_USEDEFAULT, CW_USEDEFAULT, 300, 300, 0,
NULL, NULL, 0);
assert(hwnd);
flush_sequence();
/* Windows ignores events with hwnd == 0 */
pNotifyWinEvent(events[0].message, 0, events[0].wParam, events[0].lParam);
ok_sequence(WmEmptySeq, "empty notify winevents", FALSE);
for (i = 0; i < sizeof(WmWinEventsSeq)/sizeof(WmWinEventsSeq[0]); i++)
pNotifyWinEvent(events[i].message, hwnd, events[i].wParam, events[i].lParam);
ok_sequence(WmWinEventsSeq, "notify winevents", FALSE);
ok(DestroyWindow(hwnd), "failed to destroy window\n");
}
START_TEST(msg) START_TEST(msg)
{ {
HMODULE user32 = GetModuleHandleA("user32.dll");
FARPROC pSetWinEventHook = 0;/*GetProcAddress(user32, "SetWinEventHook");*/
FARPROC pUnhookWinEvent = GetProcAddress(user32, "UnhookWinEvent");
FARPROC pIsWinEventHookInstalled = GetProcAddress(user32, "IsWinEventHookInstalled");
if (!RegisterWindowClasses()) assert(0); if (!RegisterWindowClasses()) assert(0);
if (pSetWinEventHook)
{
UINT event;
hEvent_hook = (HWINEVENTHOOK)pSetWinEventHook(EVENT_MIN, EVENT_MAX,
GetModuleHandleA(0),
win_event_proc,
GetCurrentProcessId(),
0,
WINEVENT_INCONTEXT);
assert(hEvent_hook);
if (pIsWinEventHookInstalled)
{
for (event = EVENT_MIN; event <= EVENT_MAX; event++)
ok(pIsWinEventHookInstalled(event), "IsWinEventHookInstalled(%u) failed\n", event);
}
}
hCBT_hook = SetWindowsHookExA(WH_CBT, cbt_hook_proc, 0, GetCurrentThreadId()); hCBT_hook = SetWindowsHookExA(WH_CBT, cbt_hook_proc, 0, GetCurrentThreadId());
assert(hCBT_hook); assert(hCBT_hook);
...@@ -4115,6 +4596,8 @@ START_TEST(msg) ...@@ -4115,6 +4596,8 @@ START_TEST(msg)
test_message_conversion(); test_message_conversion();
test_accelerators(); test_accelerators();
test_timers(); test_timers();
test_winevents();
UnhookWindowsHookEx(hCBT_hook); UnhookWindowsHookEx(hCBT_hook);
if (pUnhookWinEvent) pUnhookWinEvent(hEvent_hook);
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment