diff --git a/PowerEditor/src/NppBigSwitch.cpp b/PowerEditor/src/NppBigSwitch.cpp index 809958a49..92f7ef22d 100644 --- a/PowerEditor/src/NppBigSwitch.cpp +++ b/PowerEditor/src/NppBigSwitch.cpp @@ -2595,6 +2595,15 @@ LRESULT Notepad_plus::process(HWND hwnd, UINT message, WPARAM wParam, LPARAM lPa _pluginsManager.notify(&scnN); if (isSnapshotMode) ::LockWindowUpdate(NULL); + + if (!::IsWindowVisible(hwnd)) + { + // Notepad++ probably has not been restored from the systray + // - as its tray-icon was removed before, we have to show the app window otherwise we end up with no-GUI state + ::ShowWindow(hwnd, SW_SHOW); + ::SendMessage(hwnd, WM_SIZE, 0, 0); + } + return 0; // abort quitting }