comctl32: header[5/6]: remove the nOldWidth
Mikołaj Zalewski
mikolaj at zalewski.pl
Mon Sep 18 04:58:02 CDT 2006
Now that we don't need to change the cxy to send the notifies we can
remove it.
-------------- next part --------------
diff --git a/dlls/comctl32/header.c b/dlls/comctl32/header.c
index 2e1e57f..84f00f9 100644
--- a/dlls/comctl32/header.c
+++ b/dlls/comctl32/header.c
@@ -84,7 +84,6 @@ typedef struct
INT iMoveItem; /* index of tracked item. (Tracking mode) */
INT xTrackOffset; /* distance between the right side of the tracked item and the cursor */
INT xOldTrack; /* track offset (see above) after the last WM_MOUSEMOVE */
- INT nOldWidth; /* width of a sizing item after the last WM_MOUSEMOVE */
INT iHotItem; /* index of hot item (cursor is over this item) */
INT iHotDivider; /* index of the hot divider (used while dragging an item or by HDM_SETHOTDIVIDER) */
INT iMargin; /* width of the margin that surrounds a bitmap */
@@ -1581,7 +1580,6 @@ HEADER_LButtonDown (HWND hwnd, WPARAM wP
infoPtr->bCaptured = TRUE;
infoPtr->bTracking = TRUE;
infoPtr->iMoveItem = nItem;
- infoPtr->nOldWidth = iCurrWidth;
infoPtr->xTrackOffset = infoPtr->items[nItem].rect.right - pt.x;
if (!(dwStyle & HDS_FULLDRAG)) {
@@ -1674,11 +1672,8 @@ HEADER_LButtonUp (HWND hwnd, WPARAM wPar
ReleaseDC (hwnd, hdc);
}
- if (HEADER_SendNotifyWithIntFieldT(hwnd, HDN_ITEMCHANGINGW, infoPtr->iMoveItem, HDI_WIDTH, iNewWidth))
- {
- infoPtr->items[infoPtr->iMoveItem].cxy = infoPtr->nOldWidth;
- }
- else {
+ if (!HEADER_SendNotifyWithIntFieldT(hwnd, HDN_ITEMCHANGINGW, infoPtr->iMoveItem, HDI_WIDTH, iNewWidth))
+ {
infoPtr->items[infoPtr->iMoveItem].cxy = iNewWidth;
HEADER_SendNotifyWithIntFieldT(hwnd, HDN_ITEMCHANGEDW, infoPtr->iMoveItem, HDI_WIDTH, iNewWidth);
}
--
1.4.1
More information about the wine-patches
mailing list