[BUG_FIXED] Fix a visual glitch on exit

Don't make Notepad++ redraw on exit.
This commit is contained in:
Don Ho 2015-08-06 01:18:43 +02:00
parent 05183aeec5
commit ba5d36e2bf

View File

@ -1510,6 +1510,10 @@ LRESULT Notepad_plus::process(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lPa
const NppGUI & nppgui = pNppParam->getNppGUI(); const NppGUI & nppgui = pNppParam->getNppGUI();
bool isSnapshotMode = nppgui.isSnapshotMode(); bool isSnapshotMode = nppgui.isSnapshotMode();
if (isSnapshotMode)
::LockWindowUpdate(_pPublicInterface->getHSelf());
if (isSnapshotMode) if (isSnapshotMode)
MainFileManager->backupCurrentBuffer(); MainFileManager->backupCurrentBuffer();
@ -1589,9 +1593,14 @@ LRESULT Notepad_plus::process(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lPa
} }
} }
if (not isSnapshotMode)
::LockWindowUpdate(_pPublicInterface->getHSelf());
//Sends WM_DESTROY, Notepad++ will end //Sends WM_DESTROY, Notepad++ will end
if(Message == WM_CLOSE) if (Message == WM_CLOSE)
::DestroyWindow(hwnd); ::DestroyWindow(hwnd);
::LockWindowUpdate(NULL);
} }
return TRUE; return TRUE;
} }