Nikolay Sivov : comctl32/listview: Always forward HDM_SETORDERARRAY to a header.
Alexandre Julliard
julliard at wine.codeweavers.com
Tue Mar 31 10:38:50 CDT 2015
Module: wine
Branch: master
Commit: 30cdd592525340fc96b380f8900397873ed11aaa
URL: http://source.winehq.org/git/wine.git/?a=commit;h=30cdd592525340fc96b380f8900397873ed11aaa
Author: Nikolay Sivov <nsivov at codeweavers.com>
Date: Sun Mar 29 10:28:30 2015 +0300
comctl32/listview: Always forward HDM_SETORDERARRAY to a header.
---
dlls/comctl32/listview.c | 6 +-----
dlls/comctl32/tests/listview.c | 21 +++++++++++++++++++++
2 files changed, 22 insertions(+), 5 deletions(-)
diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c
index 081f2a0..d2cd940 100644
--- a/dlls/comctl32/listview.c
+++ b/dlls/comctl32/listview.c
@@ -8307,12 +8307,8 @@ static BOOL LISTVIEW_SetColumnT(const LISTVIEW_INFO *infoPtr, INT nColumn,
*/
static BOOL LISTVIEW_SetColumnOrderArray(LISTVIEW_INFO *infoPtr, INT iCount, const INT *lpiArray)
{
- TRACE("iCount %d lpiArray %p\n", iCount, lpiArray);
-
- if (!lpiArray || !IsWindow(infoPtr->hwndHeader)) return FALSE;
-
+ if (!infoPtr->hwndHeader) return FALSE;
infoPtr->colRectsDirty = TRUE;
-
return SendMessageW(infoPtr->hwndHeader, HDM_SETORDERARRAY, iCount, (LPARAM)lpiArray);
}
diff --git a/dlls/comctl32/tests/listview.c b/dlls/comctl32/tests/listview.c
index 0947251..94c19f4 100644
--- a/dlls/comctl32/tests/listview.c
+++ b/dlls/comctl32/tests/listview.c
@@ -181,6 +181,14 @@ static const struct message listview_getorderarray_seq[] = {
{ 0 }
};
+static const struct message listview_setorderarray_seq[] = {
+ { LVM_SETCOLUMNORDERARRAY, sent|id|wparam, 2, 0, LISTVIEW_ID },
+ { HDM_SETORDERARRAY, sent|id|wparam, 2, 0, HEADER_ID },
+ { LVM_SETCOLUMNORDERARRAY, sent|id|wparam, 0, 0, LISTVIEW_ID },
+ { HDM_SETORDERARRAY, sent|id|wparam, 0, 0, HEADER_ID },
+ { 0 }
+};
+
static const struct message empty_seq[] = {
{ 0 }
};
@@ -1479,6 +1487,19 @@ static void test_columns(void)
ok_sequence(sequences, LISTVIEW_SEQ_INDEX, listview_getorderarray_seq, "get order array", FALSE);
+ /* LVM_SETCOLUMNORDERARRAY */
+ flush_sequences(sequences, NUM_MSG_SEQUENCES);
+
+ order[0] = 0;
+ order[1] = 1;
+ rc = SendMessageA(hwnd, LVM_SETCOLUMNORDERARRAY, 2, (LPARAM)&order);
+ expect(1, rc);
+
+ rc = SendMessageA(hwnd, LVM_SETCOLUMNORDERARRAY, 0, 0);
+ expect(0, rc);
+
+ ok_sequence(sequences, LISTVIEW_SEQ_INDEX, listview_setorderarray_seq, "set order array", FALSE);
+
/* after column added subitem is considered as present */
insert_item(hwnd, 0);
More information about the wine-cvs
mailing list