Skip to content

Commit

Permalink
Fix Notepad++ hanging issue while user uses touch screen to activate …
Browse files Browse the repository at this point in the history
…Notepad++ windows

Make checkModifiedDocument as thread to avoid Notepad++ hanging while
user uses touch screen to activate Notepad++ windows.
  • Loading branch information
donho committed Dec 25, 2015
1 parent 715a64a commit 6f4140a
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions PowerEditor/src/NppBigSwitch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,11 @@ using namespace std;
#define WM_DPICHANGED 0x02E0



DWORD WINAPI CheckModifiedDocumentThread(LPVOID)
{
MainFileManager->checkFilesystemChanges();
return 0;
}

struct SortTaskListPred final
{
Expand Down Expand Up @@ -1347,7 +1351,11 @@ LRESULT Notepad_plus::process(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lPa
if (LOWORD(wParam) && (nppgui._fileAutoDetection != cdDisabled))
{
_activeAppInf._isActivated = true;
checkModifiedDocument();

//checkModifiedDocument();
// Make checkModifiedDocument as thread to avoid Notepad++ hanging while user uses touch screen to activate Notepad++ windows
HANDLE hThread = CreateThread(NULL, 0, &CheckModifiedDocumentThread, NULL, 0, NULL);
::CloseHandle(hThread);
return FALSE;
}
}
Expand Down

0 comments on commit 6f4140a

Please sign in to comment.