comctl32/header: Always release item down state on WM_LBUTTONUP.
This commit is contained in:
parent
84f14a3716
commit
1daf40a837
|
@ -1590,6 +1590,9 @@ HEADER_LButtonUp (HEADER_INFO *infoPtr, INT x, INT y)
|
||||||
HEADER_InternalHitTest (infoPtr, &pt, &flags, &nItem);
|
HEADER_InternalHitTest (infoPtr, &pt, &flags, &nItem);
|
||||||
|
|
||||||
if (infoPtr->bPressed) {
|
if (infoPtr->bPressed) {
|
||||||
|
|
||||||
|
infoPtr->items[infoPtr->iMoveItem].bDown = FALSE;
|
||||||
|
|
||||||
if (infoPtr->bDragging)
|
if (infoPtr->bDragging)
|
||||||
{
|
{
|
||||||
HEADER_ITEM *lpItem = &infoPtr->items[infoPtr->iMoveItem];
|
HEADER_ITEM *lpItem = &infoPtr->items[infoPtr->iMoveItem];
|
||||||
|
@ -1597,7 +1600,6 @@ HEADER_LButtonUp (HEADER_INFO *infoPtr, INT x, INT y)
|
||||||
|
|
||||||
ImageList_DragShowNolock(FALSE);
|
ImageList_DragShowNolock(FALSE);
|
||||||
ImageList_EndDrag();
|
ImageList_EndDrag();
|
||||||
lpItem->bDown=FALSE;
|
|
||||||
|
|
||||||
if (infoPtr->iHotDivider == -1)
|
if (infoPtr->iHotDivider == -1)
|
||||||
iNewOrder = -1;
|
iNewOrder = -1;
|
||||||
|
@ -1623,13 +1625,13 @@ HEADER_LButtonUp (HEADER_INFO *infoPtr, INT x, INT y)
|
||||||
infoPtr->bDragging = FALSE;
|
infoPtr->bDragging = FALSE;
|
||||||
HEADER_SetHotDivider(infoPtr, FALSE, -1);
|
HEADER_SetHotDivider(infoPtr, FALSE, -1);
|
||||||
}
|
}
|
||||||
else if (!(infoPtr->dwStyle & HDS_DRAGDROP) || !HEADER_IsDragDistance(infoPtr, &pt))
|
else
|
||||||
{
|
{
|
||||||
infoPtr->items[infoPtr->iMoveItem].bDown = FALSE;
|
|
||||||
hdc = GetDC (infoPtr->hwndSelf);
|
hdc = GetDC (infoPtr->hwndSelf);
|
||||||
HEADER_RefreshItem (infoPtr, infoPtr->iMoveItem);
|
HEADER_RefreshItem (infoPtr, infoPtr->iMoveItem);
|
||||||
ReleaseDC (infoPtr->hwndSelf, hdc);
|
ReleaseDC (infoPtr->hwndSelf, hdc);
|
||||||
|
|
||||||
|
if (!(infoPtr->dwStyle & HDS_DRAGDROP) || !HEADER_IsDragDistance(infoPtr, &pt))
|
||||||
HEADER_SendNotifyWithHDItemT(infoPtr, HDN_ITEMCLICKW, infoPtr->iMoveItem, NULL);
|
HEADER_SendNotifyWithHDItemT(infoPtr, HDN_ITEMCLICKW, infoPtr->iMoveItem, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue