mirror of
https://github.com/reactos/reactos.git
synced 2025-06-03 08:20:27 +00:00
[User32]
- Patch by Piotr Caban : Only store dialog focus when window is hidden or inactive. Only use DIALOGINFO-> hwndFocus to store last focus of inactive windows. svn path=/trunk/; revision=66182
This commit is contained in:
parent
d783274010
commit
4cb4ee6326
1 changed files with 8 additions and 8 deletions
|
@ -802,8 +802,7 @@ static void DEFDLG_RestoreFocus( HWND hwnd, BOOL justActivate )
|
|||
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;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
|
@ -1047,13 +1046,14 @@ static HWND DIALOG_CreateIndirect( HINSTANCE hInst, LPCVOID dlgTemplate,
|
|||
/* 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
|
||||
|
|
Loading…
Reference in a new issue