[PATCH] comctl32/listview: Remove internal autoarrange flag, it breaks positioning
Nikolay Sivov
nsivov at codeweavers.com
Wed May 3 06:09:27 CDT 2017
Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
---
Any internal call to _Arrange enables it, that triggers autoarrange behavior
for control resizing for example.
dlls/comctl32/listview.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c
index c01d816c46..acafbd3814 100644
--- a/dlls/comctl32/listview.c
+++ b/dlls/comctl32/listview.c
@@ -249,7 +249,6 @@ typedef struct tagLISTVIEW_INFO
RANGES selectionRanges;
INT nSelectionMark; /* item to start next multiselection from */
INT nHotItem;
- BOOL bAutoarrange; /* Autoarrange flag when NOT in LVS_AUTOARRANGE */
/* columns */
HDPA hdpaColumns; /* array of COLUMN_INFO pointers */
@@ -1584,8 +1583,8 @@ static inline LRESULT CallWindowProcT(WNDPROC proc, HWND hwnd, UINT uMsg,
static inline BOOL is_autoarrange(const LISTVIEW_INFO *infoPtr)
{
- return ((infoPtr->dwStyle & LVS_AUTOARRANGE) || infoPtr->bAutoarrange) &&
- (infoPtr->uView == LV_VIEW_ICON || infoPtr->uView == LV_VIEW_SMALLICON);
+ return (infoPtr->dwStyle & LVS_AUTOARRANGE) &&
+ (infoPtr->uView == LV_VIEW_ICON || infoPtr->uView == LV_VIEW_SMALLICON);
}
static void toggle_checkbox_state(LISTVIEW_INFO *infoPtr, INT nItem)
@@ -2782,7 +2781,6 @@ static BOOL LISTVIEW_Arrange(LISTVIEW_INFO *infoPtr, INT nAlignCode)
default: return FALSE;
}
- infoPtr->bAutoarrange = TRUE;
infoPtr->currIconPos.x = infoPtr->currIconPos.y = 0;
for (i = 0; i < infoPtr->nItemCount; i++)
{
@@ -8936,8 +8934,6 @@ static BOOL LISTVIEW_SetItemPosition(LISTVIEW_INFO *infoPtr, INT nItem, const PO
Pt.x -= Origin.x;
Pt.y -= Origin.y;
- infoPtr->bAutoarrange = FALSE;
-
return LISTVIEW_MoveIconTo(infoPtr, nItem, &Pt, FALSE);
}
--
2.11.0
More information about the wine-patches
mailing list