[PATCH 1/2] user32: Use correct values to deselect combo box text with EM_SETSEL

Dmitry Timoshkov dmitry at baikal.ru
Mon Jan 25 06:23:32 CST 2016


Hugh McMaster <hugh.mcmaster at outlook.com> wrote:

> >>>>> diff --git a/dlls/user32/combo.c b/dlls/user32/combo.c
> >>>>> index c744ee5..4c57b72 100644
> >>>>> --- a/dlls/user32/combo.c
> >>>>> +++ b/dlls/user32/combo.c
> >>>>> @@ -1189,6 +1189,8 @@ static void COMBO_KillFocus( LPHEADCOMBO lphc )
> >>>>> {
> >>>>> if( CB_GETTYPE(lphc) == CBS_DROPDOWNLIST )
> >>>>> SendMessageW(lphc->hWndLBox, LB_CARETOFF, 0, 0);
> >>>>> + else
> >>>>> + SendMessageW(lphc->hWndEdit, EM_SETSEL, 0, 0);
> >>>>
> >>>> The message test doesn't confirm that this is a correct solution.
> >>>
> >>> I tested the sequence from WM_KILLFOCUS twice in dlls/user32/tests/msg.c.
> >>>
> >>> [snip]
> >>>
> >>> In both sequences, the expected value of EM_SETSEL is 0, 0.
> >>>
> >>> Perhaps I'm not understanding what you mean in this case.
> >>
> >> I mean that adding a SendMessage() call should fix the message sequence
> >> if that's how it's supposed to work, and as a result you would remove TRUE
> >> as an indicator of todo_wine for fixed sequences.
> 
> I can't remove TRUE from those message tests yet, as the message sequence
> fails. It seems some messages are not implemented or perhaps being
> sent in the wrong order.

I would suggest to fix those failures first to make the patch look much
more convincing.

> So, for SetFocusButtonSeq, the output is:
> msg.c:6165: Test failed: SetFocus on a Button: 3: the msg 0x0202 was expected, but got msg 0x0111 instead
> 
> Is each message from the relevant sequence implemented in one file,
> e.g. user32/combo.c, or are they spread into multiple files?

Sent messages depend on performed actions, and may be sent from
different places.

-- 
Dmitry.



More information about the wine-devel mailing list