else
DEFDLG_SetFocus( infoPtr->hwndFocus );
- /* This used to set infoPtr->hwndFocus to NULL for no apparent reason,
- sometimes losing focus when receiving WM_SETFOCUS messages. */
+ infoPtr->hwndFocus = NULL;
}
/***********************************************************************
/* By returning TRUE, app has requested a default focus assignment.
* WM_INITDIALOG may have changed the tab order, so find the first
* tabstop control again. */
- dlgInfo->hwndFocus = GetNextDlgTabItem( hwnd, 0, FALSE );
- if (!dlgInfo->hwndFocus) dlgInfo->hwndFocus = GetNextDlgGroupItem( hwnd, 0, FALSE );
- if( dlgInfo->hwndFocus )
- SetFocus( dlgInfo->hwndFocus );
+ focus = GetNextDlgTabItem( hwnd, 0, FALSE );
+ if (!focus) focus = GetNextDlgGroupItem( hwnd, 0, FALSE );
+ if (focus)
+ SetFocus( focus );
}
-//// ReactOS
- DEFDLG_SaveFocus( hwnd );
+//// ReactOS see 43396, Fixes setting focus on Open and Close dialogs to the FileName edit control in OpenOffice.
+//// This now breaks test_SaveRestoreFocus.
+ //DEFDLG_SaveFocus( hwnd );
////
}
//// ReactOS Rev 30613 & 30644