Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
a6b405d6
Commit
a6b405d6
authored
Apr 06, 2004
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Apr 06, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make use of the 'defwinproc' flag in the message test.
parent
4fbafc16
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
12 deletions
+35
-12
msg.c
dlls/user/tests/msg.c
+35
-12
No files found.
dlls/user/tests/msg.c
View file @
a6b405d6
...
...
@@ -78,7 +78,7 @@ static const struct message WmShowOverlappedSeq[] = {
{
WM_GETTEXT
,
sent
|
defwinproc
},
{
WM_ACTIVATE
,
sent
|
wparam
,
1
},
{
HCBT_SETFOCUS
,
hook
},
{
WM_IME_SETCONTEXT
,
sent
|
optional
},
{
WM_IME_SETCONTEXT
,
sent
|
defwinproc
|
optional
},
{
WM_SETFOCUS
,
sent
|
wparam
|
defwinproc
,
0
},
{
WM_NCPAINT
,
sent
|
wparam
|
optional
,
1
},
{
WM_GETTEXT
,
sent
|
defwinproc
|
optional
},
...
...
@@ -147,7 +147,7 @@ static const struct message WmShowVisiblePopupSeq_3[] = {
{
WM_NCACTIVATE
,
sent
|
wparam
,
1
},
{
WM_ACTIVATE
,
sent
|
wparam
,
1
},
{
HCBT_SETFOCUS
,
hook
},
{
WM_IME_SETCONTEXT
,
sent
|
optional
},
{
WM_IME_SETCONTEXT
,
sent
|
defwinproc
|
optional
},
{
WM_SETFOCUS
,
sent
|
defwinproc
},
{
0
}
};
...
...
@@ -365,8 +365,8 @@ static const struct message WmSetMenuNonVisibleSizeChangeSeq[] = {
{
WM_WINDOWPOSCHANGING
,
sent
|
wparam
,
0
},
{
WM_NCCALCSIZE
,
sent
|
wparam
,
1
},
{
WM_WINDOWPOSCHANGED
,
sent
|
wparam
,
0
},
{
WM_MOVE
,
sent
},
{
WM_SIZE
,
sent
},
{
WM_MOVE
,
sent
|
defwinproc
},
{
WM_SIZE
,
sent
|
defwinproc
},
{
0
}
};
/* SetMenu for NonVisible windows with no size change */
...
...
@@ -381,12 +381,12 @@ static const struct message WmSetMenuVisibleSizeChangeSeq[] = {
{
WM_WINDOWPOSCHANGING
,
sent
|
wparam
,
0
},
{
WM_NCCALCSIZE
,
sent
|
wparam
,
1
},
{
WM_NCPAINT
,
sent
|
wparam
,
1
},
{
WM_GETTEXT
,
sent
},
{
WM_GETTEXT
,
sent
|
defwinproc
},
{
WM_ERASEBKGND
,
sent
|
optional
},
{
WM_ACTIVATE
,
sent
|
optional
},
{
WM_WINDOWPOSCHANGED
,
sent
|
wparam
,
0
},
{
WM_MOVE
,
sent
},
{
WM_SIZE
,
sent
},
{
WM_MOVE
,
sent
|
defwinproc
},
{
WM_SIZE
,
sent
|
defwinproc
},
{
0
}
};
/* SetMenu for Visible windows with no size change */
...
...
@@ -394,7 +394,7 @@ static const struct message WmSetMenuVisibleNoSizeChangeSeq[] = {
{
WM_WINDOWPOSCHANGING
,
sent
|
wparam
,
0
},
{
WM_NCCALCSIZE
,
sent
|
wparam
,
1
},
{
WM_NCPAINT
,
sent
|
wparam
,
1
},
{
WM_GETTEXT
,
sent
},
{
WM_GETTEXT
,
sent
|
defwinproc
},
{
WM_ERASEBKGND
,
sent
|
optional
},
{
WM_ACTIVATE
,
sent
|
optional
},
{
WM_WINDOWPOSCHANGED
,
sent
|
wparam
,
0
},
...
...
@@ -456,7 +456,9 @@ static void ok_sequence(const struct message *expected, const char *context)
ok
(
expected
->
lParam
==
actual
->
lParam
,
"%s: in msg 0x%04x expecting lParam 0x%lx got 0x%lx
\n
"
,
context
,
expected
->
message
,
expected
->
lParam
,
actual
->
lParam
);
/* FIXME: should we check defwinproc? */
ok
((
expected
->
flags
&
defwinproc
)
==
(
actual
->
flags
&
defwinproc
),
"%s: the msg 0x%04x should %shave been sent by DefWindowProc
\n
"
,
context
,
expected
->
message
,
(
expected
->
flags
&
defwinproc
)
?
""
:
"NOT "
);
ok
((
expected
->
flags
&
(
sent
|
posted
))
==
(
actual
->
flags
&
(
sent
|
posted
)),
"%s: the msg 0x%04x should have been %s
\n
"
,
context
,
expected
->
message
,
(
expected
->
flags
&
posted
)
?
"posted"
:
"sent"
);
...
...
@@ -612,27 +614,37 @@ static void test_messages(void)
static
LRESULT
WINAPI
MsgCheckProcA
(
HWND
hwnd
,
UINT
message
,
WPARAM
wParam
,
LPARAM
lParam
)
{
static
long
defwndproc_counter
=
0
;
LRESULT
ret
;
struct
message
msg
;
trace
(
"%p, %04x, %08x, %08lx
\n
"
,
hwnd
,
message
,
wParam
,
lParam
);
msg
.
message
=
message
;
msg
.
flags
=
sent
|
wparam
|
lparam
;
if
(
defwndproc_counter
)
msg
.
flags
|=
defwinproc
;
msg
.
wParam
=
wParam
;
msg
.
lParam
=
lParam
;
add_message
(
&
msg
);
return
DefWindowProcA
(
hwnd
,
message
,
wParam
,
lParam
);
defwndproc_counter
++
;
ret
=
DefWindowProcA
(
hwnd
,
message
,
wParam
,
lParam
);
defwndproc_counter
--
;
return
ret
;
}
static
LRESULT
WINAPI
PopupMsgCheckProcA
(
HWND
hwnd
,
UINT
message
,
WPARAM
wParam
,
LPARAM
lParam
)
{
static
long
defwndproc_counter
=
0
;
LRESULT
ret
;
struct
message
msg
;
trace
(
"popup: %p, %04x, %08x, %08lx
\n
"
,
hwnd
,
message
,
wParam
,
lParam
);
msg
.
message
=
message
;
msg
.
flags
=
sent
|
wparam
|
lparam
;
if
(
defwndproc_counter
)
msg
.
flags
|=
defwinproc
;
msg
.
wParam
=
wParam
;
msg
.
lParam
=
lParam
;
add_message
(
&
msg
);
...
...
@@ -643,11 +655,17 @@ static LRESULT WINAPI PopupMsgCheckProcA(HWND hwnd, UINT message, WPARAM wParam,
SetWindowLongA
(
hwnd
,
GWL_STYLE
,
style
);
}
return
DefWindowProcA
(
hwnd
,
message
,
wParam
,
lParam
);
defwndproc_counter
++
;
ret
=
DefWindowProcA
(
hwnd
,
message
,
wParam
,
lParam
);
defwndproc_counter
--
;
return
ret
;
}
static
LRESULT
WINAPI
ParentMsgCheckProcA
(
HWND
hwnd
,
UINT
message
,
WPARAM
wParam
,
LPARAM
lParam
)
{
static
long
defwndproc_counter
=
0
;
LRESULT
ret
;
struct
message
msg
;
trace
(
"parent: %p, %04x, %08x, %08lx
\n
"
,
hwnd
,
message
,
wParam
,
lParam
);
...
...
@@ -656,12 +674,17 @@ static LRESULT WINAPI ParentMsgCheckProcA(HWND hwnd, UINT message, WPARAM wParam
{
msg
.
message
=
message
;
msg
.
flags
=
sent
|
parent
|
wparam
|
lparam
;
if
(
defwndproc_counter
)
msg
.
flags
|=
defwinproc
;
msg
.
wParam
=
wParam
;
msg
.
lParam
=
lParam
;
add_message
(
&
msg
);
}
return
DefWindowProcA
(
hwnd
,
message
,
wParam
,
lParam
);
defwndproc_counter
++
;
ret
=
DefWindowProcA
(
hwnd
,
message
,
wParam
,
lParam
);
defwndproc_counter
--
;
return
ret
;
}
static
BOOL
RegisterWindowClasses
(
void
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment