[BUG_FIXED] (Author: Mike Cowperthwaite) Restore focus to editor when a panel is closed.

git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository/trunk@1337 f5eea248-9336-0410-98b8-ebc06183d4e3
This commit is contained in:
Don Ho 2015-02-09 08:33:01 +00:00
parent 9a54f90312
commit bab1575d2b
5 changed files with 10 additions and 9 deletions

View File

@ -2572,11 +2572,11 @@ void Notepad_plus::specialCmd(int id)
}
}
BOOL Notepad_plus::processIncrFindAccel(MSG *msg) const
{
if (!::IsChild(_incrementFindDlg.getHSelf(), ::GetFocus()))
return FALSE;
return ::TranslateAccelerator(_incrementFindDlg.getHSelf(), _accelerator.getIncrFindAccTable(), msg);
BOOL Notepad_plus::processIncrFindAccel(MSG *msg) const
{
if (!::IsChild(_incrementFindDlg.getHSelf(), ::GetFocus()))
return FALSE;
return ::TranslateAccelerator(_incrementFindDlg.getHSelf(), _accelerator.getIncrFindAccTable(), msg);
}
void Notepad_plus::setLanguage(LangType langType) {

View File

@ -514,7 +514,6 @@ private:
void setDisplayFormat(formatType f);
int getCmdIDFromEncoding(int encoding) const;
void setUniModeText();
void checkLangsMenu(int id) const ;
void setLanguage(LangType langType);
enum LangType menuID2LangType(int cmdID);

View File

@ -269,7 +269,7 @@ bool Notepad_plus_Window::isDlgsMsg(MSG *msg) const
{
for (size_t i = 0, len = _notepad_plus_plus_core._hModelessDlgs.size(); i < len; ++i)
{
if (_notepad_plus_plus_core.processIncrFindAccel(msg))
if (_notepad_plus_plus_core.processIncrFindAccel(msg))
return true;
if (::IsDialogMessageW(_notepad_plus_plus_core._hModelessDlgs[i], msg))

View File

@ -443,7 +443,6 @@ void Notepad_plus::command(int id)
_pDocMap->setClosed(true);
checkMenuItem(IDM_VIEW_DOC_MAP, false);
_toolBar.setCheck(IDM_VIEW_DOC_MAP, false);
_pEditView->getFocus();
}
else
{

View File

@ -353,7 +353,10 @@ LRESULT DockingManager::runProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM l
case DMM_CLOSE:
{
tTbData TbData = *((DockingCont*)lParam)->getDataOfActiveTb();
return SendNotify(TbData.hClient, DMN_CLOSE);
LRESULT res = SendNotify(TbData.hClient, DMN_CLOSE); // Be sure the active item is OK with closing
if (res == 0) // Item will be closing?
::PostMessage(_hParent, WM_ACTIVATE, WA_ACTIVE, 0); // Tell editor to take back focus
return res;
}
case DMM_FLOATALL:
{