[BROWSEUI] Fix pos of taskbar toolbar right-click menu (#5421)

Don't call ClientToScreen in handling NM_RCLICK message because NMMOUSE.pt is already in screen coordinates.
CORE-18966
This commit is contained in:
Katayama Hirofumi MZ 2023-07-11 05:28:50 +09:00 committed by GitHub
parent 831288fe69
commit b4e946f5b0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -353,7 +353,7 @@ HRESULT CISFBand::CreateSimpleToolbar(HWND hWndParent)
case NM_RCLICK:
{
HRESULT hr;
POINT pt = ((LPNMMOUSE)lParam)->pt;
POINT pt = ((LPNMMOUSE)lParam)->pt; // Already in screen coordinates
CComPtr<IContextMenu> picm;
HMENU fmenu = CreatePopupMenu();
TBBUTTON tb;
@ -363,7 +363,6 @@ HRESULT CISFBand::CreateSimpleToolbar(HWND hWndParent)
if (chk)
{
ClientToScreen(&pt);
hr = m_pISF->GetUIObjectOf(m_hWnd, 1, &pidl, IID_NULL_PPV_ARG(IContextMenu, &picm));
if (FAILED_UNEXPECTEDLY(hr))
return hr;