diff --git a/patches/user32-dialog_focus/0001-user32-Dont-reset-focus-if-current-control-is-a-chil.patch b/patches/user32-dialog_focus/0001-user32-Dont-reset-focus-if-current-control-is-a-chil.patch new file mode 100644 index 000000000..3c10839e7 --- /dev/null +++ b/patches/user32-dialog_focus/0001-user32-Dont-reset-focus-if-current-control-is-a-chil.patch @@ -0,0 +1,35 @@ +From 1e118030e5b1da7bbfa4c03548b15beb137497f5 Mon Sep 17 00:00:00 2001 +From: Alistair Leslie-Hughes +Date: Thu, 6 Dec 2018 15:01:54 +1100 +Subject: [PATCH] user32: Dont reset focus if current control is a child of our + parent + +--- + dlls/user32/dialog.c | 11 ++++++++++- + 1 file changed, 10 insertions(+), 1 deletion(-) + +diff --git a/dlls/user32/dialog.c b/dlls/user32/dialog.c +index 0b33a57..0d98d0a 100644 +--- a/dlls/user32/dialog.c ++++ b/dlls/user32/dialog.c +@@ -692,7 +692,16 @@ static HWND DIALOG_CreateIndirect( HINSTANCE hInst, LPCVOID dlgTemplate, + SetFocus( focus ); + } + else +- SetFocus( hwnd ); ++ { ++ if (template.style & WS_CHILD) ++ { ++ HWND hParent = GetParent(hwnd); ++ if (!IsChild(hParent, GetFocus())) ++ SetFocus( hwnd ); ++ } ++ else ++ SetFocus( hwnd ); ++ } + } + } + +-- +1.9.1 + diff --git a/patches/user32-dialog_focus/definition b/patches/user32-dialog_focus/definition new file mode 100644 index 000000000..bcc5b5279 --- /dev/null +++ b/patches/user32-dialog_focus/definition @@ -0,0 +1 @@ +Fixes: [46215] File Open Dialog fails to set focus to Filename text box \ No newline at end of file