From 44e9a03101e132fad856da449f422c1a515c0d36 Mon Sep 17 00:00:00 2001 From: Don Ho Date: Fri, 11 Sep 2015 01:34:28 +0200 Subject: [PATCH] Fix the restoring problem from system tray when running in admin mode (closes #884) It seems the notification area is locked (for the sake of security) while application is in Admin mode. Disabling the tray icon mode while Notepad++ is in Admin mode is the compromised solution. --- PowerEditor/src/NppBigSwitch.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PowerEditor/src/NppBigSwitch.cpp b/PowerEditor/src/NppBigSwitch.cpp index f6c70b874..95aec90c6 100644 --- a/PowerEditor/src/NppBigSwitch.cpp +++ b/PowerEditor/src/NppBigSwitch.cpp @@ -1633,7 +1633,7 @@ LRESULT Notepad_plus::process(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lPa case WM_SYSCOMMAND: { NppGUI & nppgui = (NppGUI &)(pNppParam->getNppGUI()); - if ((nppgui._isMinimizedToTray || _pPublicInterface->isPrelaunch()) && (wParam == SC_MINIMIZE)) + if (((nppgui._isMinimizedToTray && !_isAdministrator) || _pPublicInterface->isPrelaunch()) && (wParam == SC_MINIMIZE)) { if (nullptr == _pTrayIco) _pTrayIco = new trayIconControler(hwnd, IDI_M30ICON, IDC_MINIMIZED_TRAY, ::LoadIcon(_pPublicInterface->getHinst(), MAKEINTRESOURCE(IDI_M30ICON)), TEXT(""));