mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 20:03:12 +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
|
else
|
||||||
DEFDLG_SetFocus( infoPtr->hwndFocus );
|
DEFDLG_SetFocus( infoPtr->hwndFocus );
|
||||||
|
|
||||||
/* This used to set infoPtr->hwndFocus to NULL for no apparent reason,
|
infoPtr->hwndFocus = NULL;
|
||||||
sometimes losing focus when receiving WM_SETFOCUS messages. */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
|
@ -1047,13 +1046,14 @@ static HWND DIALOG_CreateIndirect( HINSTANCE hInst, LPCVOID dlgTemplate,
|
||||||
/* By returning TRUE, app has requested a default focus assignment.
|
/* By returning TRUE, app has requested a default focus assignment.
|
||||||
* WM_INITDIALOG may have changed the tab order, so find the first
|
* WM_INITDIALOG may have changed the tab order, so find the first
|
||||||
* tabstop control again. */
|
* tabstop control again. */
|
||||||
dlgInfo->hwndFocus = GetNextDlgTabItem( hwnd, 0, FALSE );
|
focus = GetNextDlgTabItem( hwnd, 0, FALSE );
|
||||||
if (!dlgInfo->hwndFocus) dlgInfo->hwndFocus = GetNextDlgGroupItem( hwnd, 0, FALSE );
|
if (!focus) focus = GetNextDlgGroupItem( hwnd, 0, FALSE );
|
||||||
if( dlgInfo->hwndFocus )
|
if (focus)
|
||||||
SetFocus( dlgInfo->hwndFocus );
|
SetFocus( focus );
|
||||||
}
|
}
|
||||||
//// ReactOS
|
//// ReactOS see 43396, Fixes setting focus on Open and Close dialogs to the FileName edit control in OpenOffice.
|
||||||
DEFDLG_SaveFocus( hwnd );
|
//// This now breaks test_SaveRestoreFocus.
|
||||||
|
//DEFDLG_SaveFocus( hwnd );
|
||||||
////
|
////
|
||||||
}
|
}
|
||||||
//// ReactOS Rev 30613 & 30644
|
//// ReactOS Rev 30613 & 30644
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue