Commit 2b37da67 authored by Gerard Patel's avatar Gerard Patel Committed by Alexandre Julliard

Check if dialog is visible before setting the focus.

parent 268a36e8
......@@ -788,7 +788,7 @@ HWND DIALOG_CreateIndirect( HINSTANCE hInst, LPCSTR dlgTemplate,
{
/* If the dlgproc has returned FALSE (indicating handling of keyboard focus)
but the focus has not changed, set the focus where we expect it. */
if ( GetFocus() == hwndPreInitFocus )
if ( (wndPtr->dwStyle & WS_VISIBLE) && ( GetFocus() == hwndPreInitFocus ) )
SetFocus( dlgInfo->hwndFocus );
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment