riched20: Add support for ECO_NOHIDESEL flag

Huw Davies huw at codeweavers.com
Fri Jul 8 05:11:17 CDT 2016


On Fri, Jul 08, 2016 at 11:34:11AM +0200, Piotr Caban wrote:
> Signed-off-by: Piotr Caban <piotr at codeweavers.com>
> 
> This patch also fixes control behavior when ECO_NOHIDESEL is not specified
> and the control looses focus (for bug 40915).
> ---
>  dlls/riched20/editor.c | 9 +++++++--
>  dlls/riched20/paint.c  | 6 ++++--
>  2 files changed, 11 insertions(+), 4 deletions(-)
> 
> 

> diff --git a/dlls/riched20/editor.c b/dlls/riched20/editor.c
> index 13a2857..b7864eb 100644
> --- a/dlls/riched20/editor.c
> +++ b/dlls/riched20/editor.c
> @@ -3453,14 +3453,15 @@ LRESULT ME_HandleMessage(ME_TextEditor *editor, UINT msg, WPARAM wParam,
>          ME_RewrapRepaint(editor);
>        }
>  
> +      if ((changedSettings & settings & ECO_NOHIDESEL) && !editor->bHaveFocus)
> +          ME_InvalidateSelection( editor );
> +
>        if (changedSettings & settings & ECO_VERTICAL)
>          FIXME("ECO_VERTICAL not implemented yet!\n");
>        if (changedSettings & settings & ECO_AUTOHSCROLL)
>          FIXME("ECO_AUTOHSCROLL not implemented yet!\n");
>        if (changedSettings & settings & ECO_AUTOVSCROLL)
>          FIXME("ECO_AUTOVSCROLL not implemented yet!\n");
> -      if (changedSettings & settings & ECO_NOHIDESEL)
> -        FIXME("ECO_NOHIDESEL not implemented yet!\n");
>        if (changedSettings & settings & ECO_WANTRETURN)
>          FIXME("ECO_WANTRETURN not implemented yet!\n");
>        if (changedSettings & settings & ECO_AUTOWORDSELECTION)
> @@ -4257,6 +4258,8 @@ LRESULT ME_HandleMessage(ME_TextEditor *editor, UINT msg, WPARAM wParam,
>      editor->bHaveFocus = TRUE;
>      ME_ShowCaret(editor);
>      ME_SendOldNotify(editor, EN_SETFOCUS);
> +    if (!editor->bHideSelection && !(editor->styleFlags & ECO_NOHIDESEL))

I think this, and all subsequent ECO_NOHIDESELs, would be better as ES_NOHIDESEL.
The first one is fine as ECO_NOHIDESEL, since that's the setting one.

Huw.



More information about the wine-devel mailing list