Commit c7212f82 authored by Daniel Jelinski's avatar Daniel Jelinski Committed by Alexandre Julliard

comctl32/treeview: Send WM_CONTEXTMENU everywhere, not just over items.

parent 602dea1e
......@@ -4274,17 +4274,12 @@ TREEVIEW_RButtonUp(const TREEVIEW_INFO *infoPtr, const POINT *pPt)
ht.pt = *pPt;
TREEVIEW_HitTest(infoPtr, &ht);
if (ht.hItem)
{
/* Change to screen coordinate for WM_CONTEXTMENU */
ClientToScreen(infoPtr->hwnd, &ht.pt);
/* Change to screen coordinate for WM_CONTEXTMENU */
ClientToScreen(infoPtr->hwnd, &ht.pt);
/* Send a WM_CONTEXTMENU message in response to the RBUTTONUP */
SendMessageW(infoPtr->hwnd, WM_CONTEXTMENU,
(WPARAM)infoPtr->hwnd, MAKELPARAM(ht.pt.x, ht.pt.y));
}
/* Send a WM_CONTEXTMENU message in response to the RBUTTONUP */
SendMessageW(infoPtr->hwnd, WM_CONTEXTMENU,
(WPARAM)infoPtr->hwnd, MAKELPARAM(ht.pt.x, ht.pt.y));
return 0;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment