From: Zhiyi Zhang zzhang@codeweavers.com
Signed-off-by: Zhiyi Zhang zzhang@codeweavers.com --- dlls/comctl32/tests/edit.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+)
diff --git a/dlls/comctl32/tests/edit.c b/dlls/comctl32/tests/edit.c index e588df8170b..429f01f8210 100644 --- a/dlls/comctl32/tests/edit.c +++ b/dlls/comctl32/tests/edit.c @@ -3326,6 +3326,22 @@ static const struct message killfocus_combined_seq[] = { 0 } };
+static const struct message setfocus_sent_only_combined_seq[] = +{ + { WM_KILLFOCUS, sent|id, 0, 0, PARENT_ID }, + { WM_SETFOCUS, sent|id, 0, 0, EDIT_ID }, + { WM_COMMAND, sent|wparam|id, MAKEWPARAM(1, EN_SETFOCUS), 0, PARENT_ID }, + { 0 } +}; + +static const struct message killfocus_sent_only_combined_seq[] = +{ + { WM_KILLFOCUS, sent|id, 0, 0, EDIT_ID }, + { WM_COMMAND, sent|wparam|id, MAKEWPARAM(1, EN_KILLFOCUS), 0, PARENT_ID }, + { WM_SETFOCUS, sent|id, 0, 0, PARENT_ID }, + { 0 } +}; + static void test_cue_banner(void) { HWND hwnd_edit; @@ -3437,6 +3453,18 @@ static void test_change_focus(void) while (PeekMessageA(&msg, 0, 0, 0, PM_REMOVE)) DispatchMessageA(&msg); ok_sequence(sequences, COMBINED_SEQ_INDEX, killfocus_combined_seq, "Kill focus", TRUE);
+ /* Test message sequences without waiting for posted messages */ + SetFocus(parent_wnd); + flush_sequences(sequences, NUM_MSG_SEQUENCES); + SetFocus(hwnd); + ok_sequence(sequences, COMBINED_SEQ_INDEX, setfocus_sent_only_combined_seq, + "Set focus sent only", TRUE); + + flush_sequences(sequences, NUM_MSG_SEQUENCES); + SetFocus(parent_wnd); + ok_sequence(sequences, COMBINED_SEQ_INDEX, killfocus_sent_only_combined_seq, + "Kill focus sent only", TRUE); + SetCursorPos(orig_pos.x, orig_pos.y);
DestroyWindow(hwnd);
From: Zhiyi Zhang zzhang@codeweavers.com
Fix MSXML 3.0 installer username edit control missing part of its edge. The application has a static control overlapping an edit control. Repainting the edit control immediately will cause the edit control to be painted under the static control.
Signed-off-by: Zhiyi Zhang zzhang@codeweavers.com --- dlls/comctl32/edit.c | 2 +- dlls/comctl32/tests/edit.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/comctl32/edit.c b/dlls/comctl32/edit.c index 5b900825981..4596d0bec67 100644 --- a/dlls/comctl32/edit.c +++ b/dlls/comctl32/edit.c @@ -3684,7 +3684,7 @@ static void EDIT_WM_NCPaint(HWND hwnd, HRGN region) */ static void EDIT_WM_SetFocus(HTHEME theme, EDITSTATE *es) { - UINT flags = RDW_INVALIDATE | RDW_UPDATENOW; + UINT flags = RDW_INVALIDATE;
es->flags |= EF_FOCUSED;
diff --git a/dlls/comctl32/tests/edit.c b/dlls/comctl32/tests/edit.c index 429f01f8210..5727fa2a4e1 100644 --- a/dlls/comctl32/tests/edit.c +++ b/dlls/comctl32/tests/edit.c @@ -3458,7 +3458,7 @@ static void test_change_focus(void) flush_sequences(sequences, NUM_MSG_SEQUENCES); SetFocus(hwnd); ok_sequence(sequences, COMBINED_SEQ_INDEX, setfocus_sent_only_combined_seq, - "Set focus sent only", TRUE); + "Set focus sent only", FALSE);
flush_sequences(sequences, NUM_MSG_SEQUENCES); SetFocus(parent_wnd);
From: Zhiyi Zhang zzhang@codeweavers.com
Ignore some messages for the parent window because the "Kill focus" message sequence starts succeeding with this commit but sometimes those messages appear on Wine and cause random test failures. Those messages are not interested in the tests so ignore them.
Signed-off-by: Zhiyi Zhang zzhang@codeweavers.com --- dlls/comctl32/edit.c | 2 +- dlls/comctl32/tests/edit.c | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/dlls/comctl32/edit.c b/dlls/comctl32/edit.c index 4596d0bec67..3111cda2a4b 100644 --- a/dlls/comctl32/edit.c +++ b/dlls/comctl32/edit.c @@ -3402,7 +3402,7 @@ static LRESULT EDIT_WM_KeyDown(EDITSTATE *es, INT key) */ static LRESULT EDIT_WM_KillFocus(HTHEME theme, EDITSTATE *es) { - UINT flags = RDW_INVALIDATE | RDW_UPDATENOW; + UINT flags = RDW_INVALIDATE;
es->flags &= ~EF_FOCUSED; DestroyCaret(); diff --git a/dlls/comctl32/tests/edit.c b/dlls/comctl32/tests/edit.c index 5727fa2a4e1..5f23fff2c9c 100644 --- a/dlls/comctl32/tests/edit.c +++ b/dlls/comctl32/tests/edit.c @@ -900,6 +900,10 @@ static LRESULT CALLBACK parent_wnd_proc(HWND hwnd, UINT message, WPARAM wParam, message != WM_GETMINMAXINFO && message != WM_PAINT && message != WM_CTLCOLOREDIT && + message != WM_WINDOWPOSCHANGING && + message != WM_WINDOWPOSCHANGED && + message != WM_MOVE && + message != WM_MOUSEACTIVATE && message < 0xc000) { add_message(sequences, COMBINED_SEQ_INDEX, &msg); @@ -3451,7 +3455,7 @@ static void test_change_focus(void) flush_sequences(sequences, NUM_MSG_SEQUENCES); SetFocus(parent_wnd); while (PeekMessageA(&msg, 0, 0, 0, PM_REMOVE)) DispatchMessageA(&msg); - ok_sequence(sequences, COMBINED_SEQ_INDEX, killfocus_combined_seq, "Kill focus", TRUE); + ok_sequence(sequences, COMBINED_SEQ_INDEX, killfocus_combined_seq, "Kill focus", FALSE);
/* Test message sequences without waiting for posted messages */ SetFocus(parent_wnd); @@ -3463,7 +3467,7 @@ static void test_change_focus(void) flush_sequences(sequences, NUM_MSG_SEQUENCES); SetFocus(parent_wnd); ok_sequence(sequences, COMBINED_SEQ_INDEX, killfocus_sent_only_combined_seq, - "Kill focus sent only", TRUE); + "Kill focus sent only", FALSE);
SetCursorPos(orig_pos.x, orig_pos.y);
This merge request was approved by Nikolay Sivov.