comctl32/listview: Hit test data pointer is never NULL when sending LVN_ITEMACTIVATE.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
a3a572beb0
commit
3febb46237
|
@ -844,31 +844,30 @@ static inline void notify_itemactivate(const LISTVIEW_INFO *infoPtr, const LVHIT
|
|||
NMITEMACTIVATE nmia;
|
||||
LVITEMW item;
|
||||
|
||||
if (htInfo) {
|
||||
nmia.uNewState = 0;
|
||||
nmia.uOldState = 0;
|
||||
nmia.uChanged = 0;
|
||||
nmia.uKeyFlags = 0;
|
||||
|
||||
item.mask = LVIF_PARAM|LVIF_STATE;
|
||||
item.iItem = htInfo->iItem;
|
||||
item.iSubItem = 0;
|
||||
item.stateMask = (UINT)-1;
|
||||
if (LISTVIEW_GetItemT(infoPtr, &item, TRUE)) {
|
||||
nmia.lParam = item.lParam;
|
||||
nmia.uOldState = item.state;
|
||||
nmia.uNewState = item.state | LVIS_ACTIVATING;
|
||||
nmia.uChanged = LVIF_STATE;
|
||||
}
|
||||
|
||||
nmia.iItem = htInfo->iItem;
|
||||
nmia.iSubItem = htInfo->iSubItem;
|
||||
nmia.ptAction = htInfo->pt;
|
||||
|
||||
if (GetKeyState(VK_SHIFT) & 0x8000) nmia.uKeyFlags |= LVKF_SHIFT;
|
||||
if (GetKeyState(VK_CONTROL) & 0x8000) nmia.uKeyFlags |= LVKF_CONTROL;
|
||||
if (GetKeyState(VK_MENU) & 0x8000) nmia.uKeyFlags |= LVKF_ALT;
|
||||
nmia.uNewState = 0;
|
||||
nmia.uOldState = 0;
|
||||
nmia.uChanged = 0;
|
||||
nmia.uKeyFlags = 0;
|
||||
|
||||
item.mask = LVIF_PARAM|LVIF_STATE;
|
||||
item.iItem = htInfo->iItem;
|
||||
item.iSubItem = 0;
|
||||
item.stateMask = (UINT)-1;
|
||||
if (LISTVIEW_GetItemT(infoPtr, &item, TRUE)) {
|
||||
nmia.lParam = item.lParam;
|
||||
nmia.uOldState = item.state;
|
||||
nmia.uNewState = item.state | LVIS_ACTIVATING;
|
||||
nmia.uChanged = LVIF_STATE;
|
||||
}
|
||||
|
||||
nmia.iItem = htInfo->iItem;
|
||||
nmia.iSubItem = htInfo->iSubItem;
|
||||
nmia.ptAction = htInfo->pt;
|
||||
|
||||
if (GetKeyState(VK_SHIFT) & 0x8000) nmia.uKeyFlags |= LVKF_SHIFT;
|
||||
if (GetKeyState(VK_CONTROL) & 0x8000) nmia.uKeyFlags |= LVKF_CONTROL;
|
||||
if (GetKeyState(VK_MENU) & 0x8000) nmia.uKeyFlags |= LVKF_ALT;
|
||||
|
||||
notify_hdr(infoPtr, LVN_ITEMACTIVATE, (LPNMHDR)&nmia);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue