forked from wine-compholio/wine-staging
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
36 additions
and
0 deletions.
There are no files selected for viewing
35 changes: 35 additions & 0 deletions
35
patches/user32-dialog_focus/0001-user32-Dont-reset-focus-if-current-control-is-a-chil.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
From 1e118030e5b1da7bbfa4c03548b15beb137497f5 Mon Sep 17 00:00:00 2001 | ||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com> | ||
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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Fixes: [46215] File Open Dialog fails to set focus to Filename text box |