[PATCH v4 1/7] shell32/autocomplete: Fix handling of Return key when an auto-suggestion item is selected

Gabriel Ivăncescu gabrielopcode at gmail.com
Tue Oct 9 09:14:53 CDT 2018


On Tue, Oct 9, 2018 at 2:54 PM Huw Davies <huw at codeweavers.com> wrote:
>
> On Fri, Sep 28, 2018 at 03:11:37PM +0300, Gabriel Ivăncescu wrote:
> > On Fri, Sep 28, 2018 at 3:00 PM Nikolay Sivov <nsivov at codeweavers.com> wrote:
> > >
> > > On 09/28/2018 02:44 PM, Gabriel Ivăncescu wrote:
> > >
> > > >           case WM_CHAR:
> > > >           case WM_UNICHAR:
> > > > +            if (wParam == This->no_fwd_char) return 0;
> > > > +            This->no_fwd_char = '\0';
> > > > +
> > > I don't know how important it is in practice, but shouldn't it go
> > > through MapVirtualKey, storing VK_ code instead of a char?
> > >
> > >
> >
> > Isn't that the opposite effect of what's needed here? Or are you
> > saying I should use it when setting no_fwd_char itself? In that case,
> > I don't think it will work for the return key, since it's different
> > depending on whether CTRL is pressed or not (like in quickComplete).
>
> I'm wondering whether a simple flag 'ignore_next_char' would be cleaner.
>
> Huw.

I don't think that's necessarily correct in all situations, depending
on the application, since there's no guarantee it will call
TranslateMessage all the time. And also, WM_CHAR can be sent
artificially without any WM_KEYDOWN, for example with AutoHotkey it's
quite common. In this case it will end up ignoring an unrelated
character if we use the flag method.



More information about the wine-devel mailing list