Skip to content

Commit f826c11

Browse files
committed
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 notepad-plus-plus#7508
1 parent 9bba129 commit f826c11

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

PowerEditor/src/Notepad_plus.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1875,6 +1875,15 @@ void Notepad_plus::filePrint(bool showDialog)
18751875

18761876
int Notepad_plus::doSaveOrNot(const TCHAR* fn, bool isMulti)
18771877
{
1878+
// In case Notepad++ is iconized into notification zone
1879+
if (!::IsWindowVisible(_pPublicInterface->getHSelf()))
1880+
{
1881+
::ShowWindow(_pPublicInterface->getHSelf(), SW_SHOW);
1882+
1883+
// Send sizing info to make window fit (specially to show tool bar.)
1884+
::SendMessage(_pPublicInterface->getHSelf(), WM_SIZE, 0, 0);
1885+
}
1886+
18781887
DoSaveOrNotBox doSaveOrNotBox;
18791888
doSaveOrNotBox.init(_pPublicInterface->getHinst(), _pPublicInterface->getHSelf(), fn, isMulti);
18801889
doSaveOrNotBox.doDialog(_nativeLangSpeaker.isRTL());

0 commit comments

Comments
 (0)