mirror of
https://github.com/notepad-plus-plus/notepad-plus-plus.git
synced 2025-07-29 16:54:43 +02:00
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.
This commit is contained in:
parent
2854de22ec
commit
44e9a03101
@ -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(""));
|
||||
|
Loading…
x
Reference in New Issue
Block a user