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

Alistair Leslie-Hughes leslie_alistair at hotmail.com
Thu Dec 13 17:05:53 CST 2018


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 );
+                }
             }
         }
 
-- 
1.9.1




More information about the wine-devel mailing list