[PATCH] user32: Dont reset focus if current dialog is a child.

Zebediah Figura z.figura12 at gmail.com
Thu Dec 13 18:47:52 CST 2018


On 12/13/18 5:05 PM, Alistair Leslie-Hughes wrote:
> Regression of 44f89322ba8825a8e4851aaaf7de89910701ca75
> 
> The standard File Open Dialog, creates an empty WS_EX_CONTROLPARENT
> child dialog which shouldn't receive focus.
> 
> Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46215
> Signed-off-by: Alistair Leslie-Hughes <leslie_alistair at hotmail.com>
> ---
>   dlls/user32/dialog.c | 5 ++++-
>   1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/dlls/user32/dialog.c b/dlls/user32/dialog.c
> index 0b33a57..72e6eee 100644
> --- a/dlls/user32/dialog.c
> +++ b/dlls/user32/dialog.c
> @@ -692,7 +692,10 @@ static HWND DIALOG_CreateIndirect( HINSTANCE hInst, LPCVOID dlgTemplate,
>                       SetFocus( focus );
>                   }
>                   else
> -                    SetFocus( hwnd );
> +                {
> +                    if (!(template.style & WS_CHILD))
> +                        SetFocus( hwnd );
> +                }
>               }
>           }
>   
> 

Surely this can be tested?



More information about the wine-devel mailing list