[0.4.7][NETSHELL] Lan Status Dlg should show on LBUTTONUP in systray,

not on LBUTTONDOWN

by porting back:
0.4.15-dev-5613-g 7a17c7d9ad CORE-18813 LBUTTONUP
0.4.9-dev-126-g 0182dcd71b *only the lanstatusui.cpp-part* DWL->DWLP x64compat
0.4.8-dev-972-g af4bdd4388 [NETSHELL] Don't use hardcoded values.
and strip EOL whitespace
This commit is contained in:
Joachim Henze 2023-02-02 12:25:39 +01:00
parent 4af9e16e6e
commit 4471bfb7cb

View file

@ -232,7 +232,7 @@ UpdateLanStatus(HWND hwndDlg, LANSTATUSUI_CONTEXT * pContext)
nid.cbSize = sizeof(nid); nid.cbSize = sizeof(nid);
nid.uID = pContext->uID; nid.uID = pContext->uID;
nid.hWnd = pContext->hwndStatusDlg; nid.hWnd = pContext->hwndStatusDlg;
nid.uVersion = 3; nid.uVersion = NOTIFYICON_VERSION;
if (pContext->pNet->GetProperties(&pProperties) == S_OK) if (pContext->pNet->GetProperties(&pProperties) == S_OK)
{ {
@ -784,7 +784,7 @@ LANStatusUiDlg(
if (lppsn->hdr.code == PSN_APPLY || lppsn->hdr.code == PSN_RESET) if (lppsn->hdr.code == PSN_APPLY || lppsn->hdr.code == PSN_RESET)
{ {
pContext = (LANSTATUSUI_CONTEXT*)GetWindowLongPtr(hwndDlg, DWLP_USER); pContext = (LANSTATUSUI_CONTEXT*)GetWindowLongPtr(hwndDlg, DWLP_USER);
SetWindowLongPtr(hwndDlg, DWL_MSGRESULT, PSNRET_NOERROR); SetWindowLongPtr(hwndDlg, DWLP_MSGRESULT, PSNRET_NOERROR);
pContext->hwndDlg = NULL; pContext->hwndDlg = NULL;
return TRUE; return TRUE;
} }
@ -926,7 +926,7 @@ LANStatusDlg(
} }
break; break;
case WM_SHOWSTATUSDLG: case WM_SHOWSTATUSDLG:
if (LOWORD(lParam) == WM_LBUTTONDOWN) if (LOWORD(lParam) == WM_LBUTTONUP)
{ {
pContext = (LANSTATUSUI_CONTEXT*)GetWindowLongPtr(hwndDlg, DWLP_USER); pContext = (LANSTATUSUI_CONTEXT*)GetWindowLongPtr(hwndDlg, DWLP_USER);
if (!pContext) if (!pContext)
@ -1041,7 +1041,7 @@ CLanStatus::InitializeNetTaskbarNotifications()
nid.cbSize = sizeof(nid); nid.cbSize = sizeof(nid);
nid.uID = Index++; nid.uID = Index++;
nid.uFlags = NIF_MESSAGE; nid.uFlags = NIF_MESSAGE;
nid.uVersion = 3; nid.uVersion = NOTIFYICON_VERSION;
nid.uCallbackMessage = WM_SHOWSTATUSDLG; nid.uCallbackMessage = WM_SHOWSTATUSDLG;
nid.hWnd = hwndDlg; nid.hWnd = hwndDlg;