Module: wine Branch: master Commit: 06a0a01e18dc523480b224f9f270f61ae18843ab URL: http://source.winehq.org/git/wine.git/?a=commit;h=06a0a01e18dc523480b224f9f2...
Author: Daniel Jelinski djelinski1@gmail.com Date: Sat Dec 8 15:02:41 2012 +0100
comctl32/listview: Forward more header notifications to parent window.
---
dlls/comctl32/listview.c | 26 +++++++++++--------------- dlls/comctl32/tests/listview.c | 8 +++----- 2 files changed, 14 insertions(+), 20 deletions(-)
diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c index d823f26..cf7cc6d 100644 --- a/dlls/comctl32/listview.c +++ b/dlls/comctl32/listview.c @@ -10272,26 +10272,25 @@ static LRESULT LISTVIEW_Notify(LISTVIEW_INFO *infoPtr, NMHDR *lpnmhdr) LISTVIEW_GetOrigin(infoPtr, &ptOrigin); infoPtr->xTrackLine = x + ptOrigin.x; LISTVIEW_DrawTrackLine(infoPtr); - break; + return notify_forward_header(infoPtr, lpnmh); } - + case HDN_ENDTRACKA: case HDN_ENDTRACKW: /* remove the track line (if any) */ LISTVIEW_DrawTrackLine(infoPtr); infoPtr->xTrackLine = -1; - break; + return notify_forward_header(infoPtr, lpnmh);
case HDN_BEGINDRAG: - notify_forward_header(infoPtr, lpnmh); - return (infoPtr->dwLvExStyle & LVS_EX_HEADERDRAGDROP) == 0; + if ((infoPtr->dwLvExStyle & LVS_EX_HEADERDRAGDROP) == 0) return 1; + return notify_forward_header(infoPtr, lpnmh);
case HDN_ENDDRAG: infoPtr->colRectsDirty = TRUE; LISTVIEW_InvalidateList(infoPtr); - notify_forward_header(infoPtr, lpnmh); - return FALSE; - + return notify_forward_header(infoPtr, lpnmh); + case HDN_ITEMCHANGEDW: case HDN_ITEMCHANGEDA: { @@ -10371,8 +10370,8 @@ static LRESULT LISTVIEW_Notify(LISTVIEW_INFO *infoPtr, NMHDR *lpnmhdr) LISTVIEW_InvalidateRect(infoPtr, &rcCol); } } - } - break; + break; + }
case HDN_ITEMCLICKW: case HDN_ITEMCLICKA: @@ -10384,9 +10383,8 @@ static LRESULT LISTVIEW_Notify(LISTVIEW_INFO *infoPtr, NMHDR *lpnmhdr) nmlv.iItem = -1; nmlv.iSubItem = lpnmh->iItem; notify_listview(infoPtr, LVN_COLUMNCLICK, &nmlv); - notify_forward_header(infoPtr, lpnmh); + return notify_forward_header(infoPtr, lpnmh); } - break;
case HDN_DIVIDERDBLCLICKW: case HDN_DIVIDERDBLCLICKA: @@ -10394,10 +10392,8 @@ static LRESULT LISTVIEW_Notify(LISTVIEW_INFO *infoPtr, NMHDR *lpnmhdr) we should use LVSCW_AUTOSIZE_USEHEADER, helper rework or split needed for that */ LISTVIEW_SetColumnWidth(infoPtr, lpnmh->iItem, LVSCW_AUTOSIZE); - notify_forward_header(infoPtr, lpnmh); - break; + return notify_forward_header(infoPtr, lpnmh); } - return 0; }
diff --git a/dlls/comctl32/tests/listview.c b/dlls/comctl32/tests/listview.c index 5ea0b03..0dfddef 100644 --- a/dlls/comctl32/tests/listview.c +++ b/dlls/comctl32/tests/listview.c @@ -5012,22 +5012,20 @@ static void test_header_notification2(void) ret = SendMessageW(list, WM_NOTIFY, 0, (LPARAM)&nmhdr); parent_header_notify_seq[0].id = HDN_ENDTRACKA; ok_sequence(sequences, PARENT_SEQ_INDEX, parent_header_notify_seq, - "header notify, parent", TRUE); - todo_wine + "header notify, parent", FALSE); ok(nmhdr.hdr.code == HDN_ENDTRACKA, "Expected ANSI notification code\n"); flush_sequences(sequences, NUM_MSG_SEQUENCES); nmhdr.hdr.code = HDN_TRACKW; ret = SendMessageW(list, WM_NOTIFY, 0, (LPARAM)&nmhdr); parent_header_notify_seq[0].id = HDN_TRACKA; ok_sequence(sequences, PARENT_SEQ_INDEX, parent_header_notify_seq, - "header notify, parent", TRUE); - todo_wine + "header notify, parent", FALSE); ok(nmhdr.hdr.code == HDN_TRACKA, "Expected ANSI notification code\n"); flush_sequences(sequences, NUM_MSG_SEQUENCES); nmhdr.hdr.code = HDN_BEGINDRAG; ret = SendMessageW(list, WM_NOTIFY, 0, (LPARAM)&nmhdr); ok_sequence(sequences, PARENT_SEQ_INDEX, empty_seq, - "header notify, parent", TRUE); + "header notify, parent", FALSE); flush_sequences(sequences, NUM_MSG_SEQUENCES); nmhdr.hdr.code = HDN_ENDDRAG; ret = SendMessageW(list, WM_NOTIFY, 0, (LPARAM)&nmhdr);