Fix Notepad++ blocked in notification zone issue

In the case of backup feature being disabled, if Notepad++ has a modified file, and it is reduced into the nofitication zone, closing Notepad++ via notification zone will trigger doSave dialog, then Notepad++ stuck after closing the dialog.

Fix #7508
This commit is contained in:
Don HO 2019-11-12 03:28:51 +01:00
parent 9bba1291d4
commit f826c1180c
No known key found for this signature in database
GPG Key ID: 6C429F1D8D84F46E

View File

@ -1875,6 +1875,15 @@ void Notepad_plus::filePrint(bool showDialog)
int Notepad_plus::doSaveOrNot(const TCHAR* fn, bool isMulti)
{
// In case Notepad++ is iconized into notification zone
if (!::IsWindowVisible(_pPublicInterface->getHSelf()))
{
::ShowWindow(_pPublicInterface->getHSelf(), SW_SHOW);
// Send sizing info to make window fit (specially to show tool bar.)
::SendMessage(_pPublicInterface->getHSelf(), WM_SIZE, 0, 0);
}
DoSaveOrNotBox doSaveOrNotBox;
doSaveOrNotBox.init(_pPublicInterface->getHinst(), _pPublicInterface->getHSelf(), fn, isMulti);
doSaveOrNotBox.doDialog(_nativeLangSpeaker.isRTL());