comctl32: Improve right-click handling in treeview controls.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com> Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
aa1580398e
commit
d6a6055bc9
|
@ -4347,7 +4347,12 @@ TREEVIEW_RButtonDown(TREEVIEW_INFO *infoPtr, LPARAM lParam)
|
||||||
ht.pt.x = (short)LOWORD(lParam);
|
ht.pt.x = (short)LOWORD(lParam);
|
||||||
ht.pt.y = (short)HIWORD(lParam);
|
ht.pt.y = (short)HIWORD(lParam);
|
||||||
|
|
||||||
TREEVIEW_HitTest(infoPtr, &ht);
|
if (TREEVIEW_HitTest(infoPtr, &ht))
|
||||||
|
{
|
||||||
|
infoPtr->focusedItem = ht.hItem;
|
||||||
|
TREEVIEW_InvalidateItem(infoPtr, infoPtr->focusedItem);
|
||||||
|
TREEVIEW_InvalidateItem(infoPtr, infoPtr->selectedItem);
|
||||||
|
}
|
||||||
|
|
||||||
if (TREEVIEW_TrackMouse(infoPtr, ht.pt))
|
if (TREEVIEW_TrackMouse(infoPtr, ht.pt))
|
||||||
{
|
{
|
||||||
|
@ -4368,6 +4373,13 @@ TREEVIEW_RButtonDown(TREEVIEW_INFO *infoPtr, LPARAM lParam)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (ht.hItem)
|
||||||
|
{
|
||||||
|
TREEVIEW_InvalidateItem(infoPtr, infoPtr->focusedItem);
|
||||||
|
infoPtr->focusedItem = infoPtr->selectedItem;
|
||||||
|
TREEVIEW_InvalidateItem(infoPtr, infoPtr->focusedItem);
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue