"Dimitrie O. Paun" dimi@intelliware.ca writes:
For the gui, I'm not sure if it would fit better somewhere else, or if you can come up with a better name, or if we should just merge it into a .c file (it is kinda big for that though), or even add the message traces in the comments for each of the functions they document (having them all in one file is also helpful, as it gives a nice summary about how and when these messages are sent).
IMO the right place for that info is in a regression test that actually checks the message order. It should be pretty trivial to write a window procedure that takes an expected message list and checks that each successive message it receives corresponds to the next entry in that list.
On September 27, 2003 04:52 pm, Alexandre Julliard wrote:
IMO the right place for that info is in a regression test that actually checks the message order. It should be pretty trivial to write a window procedure that takes an expected message list and checks that each successive message it receives corresponds to the next entry in that list.
Good idea. How do we simulate the mouse, for these cases:
Moving the mouse Moving by dragging the title bar (after WM_NCHITTEST and WM_SETCURSOR) (outline move) Sizing by dragging the thick borders (after WM_NCHITTEST and WM_SETCURSOR) (outline move) Clicking on inactive button
ANd how do we differentiate between messages sent and posted? Is this difference important to test?
"Dimitrie O. Paun" dpaun@rogers.com writes:
Good idea. How do we simulate the mouse, for these cases:
SendInput() does that. Moving a window with it might be a bit tricky (you probably need to use a child window to avoid trouble with managed mode).
ANd how do we differentiate between messages sent and posted? Is this difference important to test?
Call InSendMessage() in the window procedure. Yes I think it's worth testing, it can potentially cause deadlocks if we don't use the right kind of message.
Well, I did a _bit_ of the test, and things are not looking good. I just did the {Create,Show,Destroy}Window tests for overlapped and child windows, and I get quite a bit of failures. Before we go around wine tweaking things to match the tests, I'd like to have the test run on a bunch of Windows versions to make sure things are right.
Any suggestions on what I should include/exclude/avoid/etc.?
This is what I get now:
msg.c:403: Test failed: CreateWindow:overlapped: msg 0x24 should have been sent msg.c:403: Test failed: CreateWindow:overlapped: msg 0x81 should have been sent msg.c:403: Test failed: CreateWindow:overlapped: msg 0x83 should have been sent msg.c:403: Test failed: CreateWindow:overlapped: msg 0x1 should have been sent msg.c:403: Test failed: ShowWindow:overlapped: msg 0x18 should have been sent msg.c:396: Test failed: ShowWindow:overlapped: in msg 0x46 expecting wParam 0x43 got 0x0 msg.c:403: Test failed: ShowWindow:overlapped: msg 0x46 should have been sent msg.c:407: Test failed: ShowWindow:overlapped: unexpected msg 0x83 msg.c:407: Test failed: ShowWindow:overlapped: unexpected msg 0x30f msg.c:407: Test failed: ShowWindow:overlapped: unexpected msg 0x1c msg.c:407: Test failed: ShowWindow:overlapped: unexpected msg 0x86 msg.c:403: Test failed: ShowWindow:overlapped: msg 0x6 should have been sent msg.c:403: Test failed: ShowWindow:overlapped: msg 0x7 should have been sent msg.c:407: Test failed: ShowWindow:overlapped: unexpected msg 0x47 msg.c:407: Test failed: ShowWindow:overlapped: unexpected msg 0x5 msg.c:407: Test failed: ShowWindow:overlapped: unexpected msg 0x3 msg.c:338: Test failed: ShowWindow:overlapped: message 0x46 was not received msg.c:338: Test failed: ShowWindow:overlapped: message 0x1c was not received msg.c:338: Test failed: ShowWindow:overlapped: message 0x86 was not received msg.c:338: Test failed: ShowWindow:overlapped: message 0xd was not received msg.c:338: Test failed: ShowWindow:overlapped: message 0x85 was not received msg.c:338: Test failed: ShowWindow:overlapped: message 0xd was not received msg.c:338: Test failed: ShowWindow:overlapped: message 0x14 was not received msg.c:338: Test failed: ShowWindow:overlapped: message 0x47 was not received msg.c:338: Test failed: ShowWindow:overlapped: message 0x5 was not received msg.c:338: Test failed: ShowWindow:overlapped: message 0x3 was not received msg.c:407: Test failed: DestroyWindow:overlapped: unexpected msg 0x8 msg.c:407: Test failed: DestroyWindow:overlapped: unexpected msg 0x18 msg.c:407: Test failed: DestroyWindow:overlapped: unexpected msg 0x46 msg.c:407: Test failed: DestroyWindow:overlapped: unexpected msg 0x47 msg.c:407: Test failed: DestroyWindow:overlapped: unexpected msg 0x86 msg.c:407: Test failed: DestroyWindow:overlapped: unexpected msg 0x6 msg.c:407: Test failed: DestroyWindow:overlapped: unexpected msg 0x1c msg.c:407: Test failed: DestroyWindow:overlapped: unexpected msg 0x2 msg.c:407: Test failed: DestroyWindow:overlapped: unexpected msg 0x82 msg.c:338: Test failed: DestroyWindow:overlapped: message 0x46 was not received msg.c:338: Test failed: DestroyWindow:overlapped: message 0x47 was not received msg.c:338: Test failed: DestroyWindow:overlapped: message 0x86 was not received msg.c:338: Test failed: DestroyWindow:overlapped: message 0x6 was not received msg.c:338: Test failed: DestroyWindow:overlapped: message 0x1c was not received msg.c:338: Test failed: DestroyWindow:overlapped: message 0x8 was not received msg.c:338: Test failed: DestroyWindow:overlapped: message 0x2 was not received msg.c:338: Test failed: DestroyWindow:overlapped: message 0x82 was not received msg.c:403: Test failed: CreateWindow:child: msg 0x81 should have been sent msg.c:403: Test failed: CreateWindow:child: msg 0x83 should have been sent msg.c:403: Test failed: CreateWindow:child: msg 0x1 should have been sent msg.c:403: Test failed: CreateWindow:child: msg 0x5 should have been sent msg.c:403: Test failed: CreateWindow:child: msg 0x3 should have been sent msg.c:403: Test failed: ShowWindow:child: msg 0x18 should have been sent msg.c:403: Test failed: ShowWindow:child: msg 0x46 should have been sent msg.c:407: Test failed: ShowWindow:child: unexpected msg 0x83 msg.c:407: Test failed: ShowWindow:child: unexpected msg 0x47 msg.c:338: Test failed: ShowWindow:child: message 0x47 was not received msg.c:403: Test failed: DestroyWindow:child: msg 0x18 should have been
"Dimitrie O. Paun" dpaun@rogers.com wrote:
Well, I did a _bit_ of the test, and things are not looking good. I just did the {Create,Show,Destroy}Window tests for overlapped and child windows, and I get quite a bit of failures. Before we go around wine tweaking things to match the tests, I'd like to have the test run on a bunch of Windows versions to make sure things are right.
I assume that the reported failures were produced by running your test under Wine? Right?
It seems that the test you were running is a bit different from the one you posted to the list, line numbers don't match.
I'm attaching a diff between your output and an output of the test run under win2k (line numbers were stripped before the diff).
On September 29, 2003 04:57 am, Dmitry Timoshkov wrote:
I'm attaching a diff between your output and an output of the test run under win2k (line numbers were stripped before the diff).
Thanks, but there is still something fishy with the test. I've changed the InSendMessage() test to something more clear:
if (sequence.current->posted) ok (!InSendMessage(), "%s: msg 0x%x should have been posted\n", sequence.context, message); else ok (InSendMessage(), "%s: msg 0x%x should have been sent\n", sequence.context, message);
(here, the ->posted flag is TRUE iff the message should be posted)
However, I still get:
msg.c:401: Test failed: CreateWindow:overlapped: msg 0x24 should have been sent
Now, msg 0x24 is WM_GETMINMAXINFO:
#define WM_GETMINMAXINFO 0x0024
But this one we are actually sending:
/windows/winpos.c: SendMessageA( hwnd, WM_GETMINMAXINFO, 0, (LPARAM)&MinMax );
So it seems that InSendMessage() always returns FALSE. Alexandre, is this function supposed to work?
man, 29.09.2003 kl. 16.33 skrev Dimitrie O. Paun:
On September 29, 2003 04:57 am, Dmitry Timoshkov wrote:
I'm attaching a diff between your output and an output of the test run under win2k (line numbers were stripped before the diff).
So it seems that InSendMessage() always returns FALSE. Alexandre, is this function supposed to work?
What it's really supposed to do is only return TRUE if it's an *interthread* sent message, where a different thread is waiting for a reply. Otherwise (including intrathread sent messages) it returns FALSE. I don't think there's a way to ask Windows whether a message is sent from a routine in the same thread or dispatched through DispatchMessage (DispatchMessage might even just use SendMessage internally anyway so it could be the same thing). You'd probably have to do like I did in my libtest/guitest.c, set a flag when you call DispatchMessage so that the message proc knows it's a posted message.