winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
March 2023
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
1 participants
910 discussions
Start a n
N
ew thread
Angelo Haller : comctl32/listview: Send LVN_ODSTATECHANGED notification for LVS_OWNERDATA listview on selection changes.
by Alexandre Julliard
27 Mar '23
27 Mar '23
Module: wine Branch: oldstable Commit: 1e7f10d2d93f88ca3adc1af304e8fe30ad74ca2f URL:
https://gitlab.winehq.org/wine/wine/-/commit/1e7f10d2d93f88ca3adc1af304e8fe…
Author: Angelo Haller <angelo(a)szanni.org> Date: Tue Jun 28 16:16:10 2022 -0500 comctl32/listview: Send LVN_ODSTATECHANGED notification for LVS_OWNERDATA listview on selection changes. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=52534
Signed-off-by: Angelo Haller <angelo(a)szanni.org> (cherry picked from commit c73290154297e037d2f9181eba01759e1e13965f) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/comctl32/listview.c | 16 ++++++++++++---- dlls/comctl32/tests/listview.c | 4 ++-- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c index eb778c323f4..a20ce36a989 100644 --- a/dlls/comctl32/listview.c +++ b/dlls/comctl32/listview.c @@ -3608,6 +3608,7 @@ static BOOL LISTVIEW_AddGroupSelection(LISTVIEW_INFO *infoPtr, INT nItem) */ static void LISTVIEW_SetGroupSelection(LISTVIEW_INFO *infoPtr, INT nItem) { + INT nFirst = -1, nLast = -1; RANGES selection; DWORD old_mask; LVITEMW item; @@ -3659,21 +3660,28 @@ static void LISTVIEW_SetGroupSelection(LISTVIEW_INFO *infoPtr, INT nItem) iterator_destroy(&i); } - /* disable per item notifications on LVS_OWNERDATA style - FIXME: single LVN_ODSTATECHANGED should be used */ + /* Disable per item notifications on LVS_OWNERDATA style */ old_mask = infoPtr->notify_mask & NOTIFY_MASK_ITEM_CHANGE; if (infoPtr->dwStyle & LVS_OWNERDATA) infoPtr->notify_mask &= ~NOTIFY_MASK_ITEM_CHANGE; LISTVIEW_DeselectAllSkipItems(infoPtr, selection); - iterator_rangesitems(&i, selection); while(iterator_next(&i)) - LISTVIEW_SetItemState(infoPtr, i.nItem, &item); + { + /* Find the range for LVN_ODSTATECHANGED */ + if (nFirst == -1) + nFirst = i.nItem; + nLast = i.nItem; + LISTVIEW_SetItemState(infoPtr, i.nItem, &item); + } /* this will also destroy the selection */ iterator_destroy(&i); + if (infoPtr->dwStyle & LVS_OWNERDATA) + LISTVIEW_SetOwnerDataState(infoPtr, nFirst, nLast, &item); + infoPtr->notify_mask |= old_mask; LISTVIEW_SetItemFocus(infoPtr, nItem); } diff --git a/dlls/comctl32/tests/listview.c b/dlls/comctl32/tests/listview.c index a8589b96a06..13069410ac1 100644 --- a/dlls/comctl32/tests/listview.c +++ b/dlls/comctl32/tests/listview.c @@ -3575,7 +3575,7 @@ static void test_ownerdata_multiselect(void) ok_sequence(sequences, PARENT_ODSTATECHANGED_SEQ_INDEX, ownerdata_multiselect_odstatechanged_seq, - "ownerdata select multiple notification", TRUE); + "ownerdata select multiple notification", FALSE); res = SendMessageA(hwnd, WM_KEYUP, VK_DOWN, 0); expect(0, res); @@ -3592,7 +3592,7 @@ static void test_ownerdata_multiselect(void) ok_sequence(sequences, PARENT_ODSTATECHANGED_SEQ_INDEX, ownerdata_multiselect_odstatechanged_seq, - "ownerdata select multiple notification", TRUE); + "ownerdata select multiple notification", FALSE); res = SendMessageA(hwnd, WM_KEYUP, VK_DOWN, 0); expect(0, res);
1
0
0
0
Angelo Haller : comctl32/listview: Send LVN_ODSTATECHANGED only for LVS_OWNERDATA listviews.
by Alexandre Julliard
27 Mar '23
27 Mar '23
Module: wine Branch: oldstable Commit: eab4d0ad1f344d9178573fd510ab7217b2ab13a0 URL:
https://gitlab.winehq.org/wine/wine/-/commit/eab4d0ad1f344d9178573fd510ab72…
Author: Angelo Haller <angelo(a)szanni.org> Date: Tue Jun 28 16:16:09 2022 -0500 comctl32/listview: Send LVN_ODSTATECHANGED only for LVS_OWNERDATA listviews. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=53123
Signed-off-by: Angelo Haller <angelo(a)szanni.org> (cherry picked from commit 6c814f81aa3ab1ffdc27837c6b0d7a2c9b445316) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/comctl32/listview.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c index 60072558da9..eb778c323f4 100644 --- a/dlls/comctl32/listview.c +++ b/dlls/comctl32/listview.c @@ -3585,7 +3585,8 @@ static BOOL LISTVIEW_AddGroupSelection(LISTVIEW_INFO *infoPtr, INT nItem) for (i = nFirst; i <= nLast; i++) LISTVIEW_SetItemState(infoPtr,i,&item); - LISTVIEW_SetOwnerDataState(infoPtr, nFirst, nLast, &item); + if (infoPtr->dwStyle & LVS_OWNERDATA) + LISTVIEW_SetOwnerDataState(infoPtr, nFirst, nLast, &item); if (!IsWindow(hwndSelf)) return FALSE;
1
0
0
0
Angelo Haller : comctl32/listview: Move sending LVN_ODSTATECHANGED notifications to a function.
by Alexandre Julliard
27 Mar '23
27 Mar '23
Module: wine Branch: oldstable Commit: cc6d05fbdf682e01ea788ec1d4a9404c5beb3391 URL:
https://gitlab.winehq.org/wine/wine/-/commit/cc6d05fbdf682e01ea788ec1d4a940…
Author: Angelo Haller <angelo(a)szanni.org> Date: Tue Jun 28 16:16:08 2022 -0500 comctl32/listview: Move sending LVN_ODSTATECHANGED notifications to a function. Signed-off-by: Angelo Haller <angelo(a)szanni.org> (cherry picked from commit 425fd8f80e23e34667697f7032d002da8d10a352) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/comctl32/listview.c | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c index 5c695c216e5..60072558da9 100644 --- a/dlls/comctl32/listview.c +++ b/dlls/comctl32/listview.c @@ -436,6 +436,7 @@ static INT LISTVIEW_GetStringWidthT(const LISTVIEW_INFO *, LPCWSTR, BOOL); static BOOL LISTVIEW_KeySelection(LISTVIEW_INFO *, INT, BOOL); static UINT LISTVIEW_GetItemState(const LISTVIEW_INFO *, INT, UINT); static BOOL LISTVIEW_SetItemState(LISTVIEW_INFO *, INT, const LVITEMW *); +static VOID LISTVIEW_SetOwnerDataState(LISTVIEW_INFO *, INT, INT, const LVITEMW *); static LRESULT LISTVIEW_VScroll(LISTVIEW_INFO *, INT, INT); static LRESULT LISTVIEW_HScroll(LISTVIEW_INFO *, INT, INT); static BOOL LISTVIEW_EnsureVisible(LISTVIEW_INFO *, INT, BOOL); @@ -3563,7 +3564,6 @@ static BOOL LISTVIEW_AddGroupSelection(LISTVIEW_INFO *infoPtr, INT nItem) INT nFirst = min(infoPtr->nSelectionMark, nItem); INT nLast = max(infoPtr->nSelectionMark, nItem); HWND hwndSelf = infoPtr->hwndSelf; - NMLVODSTATECHANGE nmlv; DWORD old_mask; LVITEMW item; INT i; @@ -3585,13 +3585,8 @@ static BOOL LISTVIEW_AddGroupSelection(LISTVIEW_INFO *infoPtr, INT nItem) for (i = nFirst; i <= nLast; i++) LISTVIEW_SetItemState(infoPtr,i,&item); - ZeroMemory(&nmlv, sizeof(nmlv)); - nmlv.iFrom = nFirst; - nmlv.iTo = nLast; - nmlv.uOldState = 0; - nmlv.uNewState = item.state; + LISTVIEW_SetOwnerDataState(infoPtr, nFirst, nLast, &item); - notify_hdr(infoPtr, LVN_ODSTATECHANGED, (LPNMHDR)&nmlv); if (!IsWindow(hwndSelf)) return FALSE; infoPtr->notify_mask |= old_mask; @@ -8894,6 +8889,22 @@ static BOOL LISTVIEW_SetItemPosition(LISTVIEW_INFO *infoPtr, INT nItem, const PO return LISTVIEW_MoveIconTo(infoPtr, nItem, &Pt, FALSE); } +/* Make sure to also disable per item notifications via the notification mask. */ +static VOID LISTVIEW_SetOwnerDataState(LISTVIEW_INFO *infoPtr, INT nFirst, INT nLast, const LVITEMW *item) +{ + NMLVODSTATECHANGE nmlv; + + if (!item) return; + + ZeroMemory(&nmlv, sizeof(nmlv)); + nmlv.iFrom = nFirst; + nmlv.iTo = nLast; + nmlv.uOldState = 0; + nmlv.uNewState = item->state; + + notify_hdr(infoPtr, LVN_ODSTATECHANGED, (LPNMHDR)&nmlv); +} + /*** * DESCRIPTION: * Sets the state of one or many items.
1
0
0
0
Angelo Haller : comctl32/listview: Send one deselect all items notification for LVS_OWNERDATA listviews.
by Alexandre Julliard
27 Mar '23
27 Mar '23
Module: wine Branch: oldstable Commit: 813b704ece756dafacc8f018c1615ec8c3dfa63d URL:
https://gitlab.winehq.org/wine/wine/-/commit/813b704ece756dafacc8f018c1615e…
Author: Angelo Haller <angelo(a)szanni.org> Date: Tue Jun 28 16:16:07 2022 -0500 comctl32/listview: Send one deselect all items notification for LVS_OWNERDATA listviews. Send one deselect all items notification on selection change for LVS_OWNERDATA listviews instead of notifying about each individual item change. Signed-off-by: Angelo Haller <angelo(a)szanni.org> (cherry picked from commit 8b392553b32677d25fd3e0fe14f70a5693f3b42c) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/comctl32/listview.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c index 1b39cf3d41a..5c695c216e5 100644 --- a/dlls/comctl32/listview.c +++ b/dlls/comctl32/listview.c @@ -3404,7 +3404,14 @@ static BOOL LISTVIEW_DeselectAllSkipItems(LISTVIEW_INFO *infoPtr, RANGES toSkip) lvItem.state = 0; lvItem.stateMask = LVIS_SELECTED; - + + /* Only send one deselect all (-1) notification for LVS_OWNERDATA style */ + if (infoPtr->dwStyle & LVS_OWNERDATA) + { + LISTVIEW_SetItemState(infoPtr, -1, &lvItem); + return TRUE; + } + /* need to clone the DPA because callbacks can change it */ if (!(clone = ranges_clone(infoPtr->selectionRanges))) return FALSE; iterator_rangesitems(&i, ranges_diff(clone, toSkip));
1
0
0
0
Angelo Haller : comctl32/tests: Add change sequence for ownerdata listviews.
by Alexandre Julliard
27 Mar '23
27 Mar '23
Module: wine Branch: oldstable Commit: 7fc9c2ef9a6a50292975e8766df9b405b2b54c28 URL:
https://gitlab.winehq.org/wine/wine/-/commit/7fc9c2ef9a6a50292975e8766df9b4…
Author: Angelo Haller <angelo(a)szanni.org> Date: Thu Apr 28 08:20:11 2022 -0500 comctl32/tests: Add change sequence for ownerdata listviews. Add a new test sequence for ownerdata listviews that logs solely item change notifications for single and multiple items changing. Use it in the ownerdata multiselect tests. Signed-off-by: Angelo Haller <angelo(a)szanni.org> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit 1132f5f74be000a8cda980030f8405fa41df8b07) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/comctl32/tests/listview.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/dlls/comctl32/tests/listview.c b/dlls/comctl32/tests/listview.c index 129d51ec7f8..a8589b96a06 100644 --- a/dlls/comctl32/tests/listview.c +++ b/dlls/comctl32/tests/listview.c @@ -37,6 +37,7 @@ enum seq_index { PARENT_SEQ_INDEX, PARENT_FULL_SEQ_INDEX, PARENT_CD_SEQ_INDEX, + PARENT_ODSTATECHANGED_SEQ_INDEX, LISTVIEW_SEQ_INDEX, EDITBOX_SEQ_INDEX, COMBINED_SEQ_INDEX, @@ -244,6 +245,14 @@ static const struct message ownerdata_deselect_all_parent_seq[] = { { 0 } }; +static const struct message ownerdata_multiselect_odstatechanged_seq[] = { + { WM_NOTIFY, sent|id, 0, 0, LVN_ITEMCHANGED }, + { WM_NOTIFY, sent|id, 0, 0, LVN_ODSTATECHANGED }, + { WM_NOTIFY, sent|id, 0, 0, LVN_ITEMCHANGED }, + { WM_NOTIFY, sent|id, 0, 0, LVN_ITEMCHANGED }, + { 0 } +}; + static const struct message change_all_parent_seq[] = { { WM_NOTIFY, sent|id, 0, 0, LVN_ITEMCHANGING }, { WM_NOTIFY, sent|id, 0, 0, LVN_ITEMCHANGED }, @@ -522,6 +531,10 @@ static LRESULT WINAPI parent_wnd_proc(HWND hwnd, UINT message, WPARAM wParam, LP add_message(sequences, PARENT_SEQ_INDEX, &msg); add_message(sequences, COMBINED_SEQ_INDEX, &msg); } + /* log change messages for single and multiple items changing in ownerdata listviews */ + if (message == WM_NOTIFY && (msg.id == LVN_ITEMCHANGED || msg.id == LVN_ODSTATECHANGED)) + add_message(sequences, PARENT_ODSTATECHANGED_SEQ_INDEX, &msg); + add_message(sequences, PARENT_FULL_SEQ_INDEX, &msg); switch (message) @@ -3555,8 +3568,15 @@ static void test_ownerdata_multiselect(void) hold_key(VK_SHIFT); + flush_sequences(sequences, NUM_MSG_SEQUENCES); + res = SendMessageA(hwnd, WM_KEYDOWN, VK_DOWN, 0); expect(0, res); + + ok_sequence(sequences, PARENT_ODSTATECHANGED_SEQ_INDEX, + ownerdata_multiselect_odstatechanged_seq, + "ownerdata select multiple notification", TRUE); + res = SendMessageA(hwnd, WM_KEYUP, VK_DOWN, 0); expect(0, res); @@ -3565,8 +3585,15 @@ static void test_ownerdata_multiselect(void) hold_key(VK_CONTROL); + flush_sequences(sequences, NUM_MSG_SEQUENCES); + res = SendMessageA(hwnd, WM_KEYDOWN, VK_DOWN, 0); expect(0, res); + + ok_sequence(sequences, PARENT_ODSTATECHANGED_SEQ_INDEX, + ownerdata_multiselect_odstatechanged_seq, + "ownerdata select multiple notification", TRUE); + res = SendMessageA(hwnd, WM_KEYUP, VK_DOWN, 0); expect(0, res);
1
0
0
0
Angelo Haller : comctl32/tests: Add multi select tests for ownerdata listviews.
by Alexandre Julliard
27 Mar '23
27 Mar '23
Module: wine Branch: oldstable Commit: a911175205c2aec6e29803aa93071a1066307977 URL:
https://gitlab.winehq.org/wine/wine/-/commit/a911175205c2aec6e29803aa93071a…
Author: Angelo Haller <angelo(a)szanni.org> Date: Thu Apr 28 08:20:10 2022 -0500 comctl32/tests: Add multi select tests for ownerdata listviews. Add tests for selecting multiple items in ownerdata listviews by using SHIFT/CTRL and arrow keys. Signed-off-by: Angelo Haller <angelo(a)szanni.org> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit ca9e3586de3957716391f76abdb9a16cb6093c32) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/comctl32/tests/listview.c | 52 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/dlls/comctl32/tests/listview.c b/dlls/comctl32/tests/listview.c index ffdb30bcaca..129d51ec7f8 100644 --- a/dlls/comctl32/tests/listview.c +++ b/dlls/comctl32/tests/listview.c @@ -3529,6 +3529,56 @@ static void test_ownerdata(void) DestroyWindow(hwnd); } +static void test_ownerdata_multiselect(void) +{ + HWND hwnd; + DWORD res; + LVITEMA item; + + hwnd = create_listview_control(LVS_OWNERDATA | LVS_REPORT); + ok(hwnd != NULL, "failed to create a listview window\n"); + res = SendMessageA(hwnd, LVM_SETITEMCOUNT, 20, 0); + expect(1, res); + res = SendMessageA(hwnd, LVM_GETSELECTEDCOUNT, 0, 0); + expect(0, res); + + memset(&item, 0, sizeof(item)); + item.state = LVIS_SELECTED | LVIS_FOCUSED; + item.stateMask = LVIS_SELECTED | LVIS_FOCUSED; + res = SendMessageA(hwnd, LVM_SETITEMSTATE, 0, (LPARAM)&item); + expect(TRUE, res); + res = SendMessageA(hwnd, LVM_GETSELECTEDCOUNT, 0, 0); + expect(1, res); + + res = SendMessageA(hwnd, LVM_SETSELECTIONMARK, 0, 0); + expect(0, res); + + hold_key(VK_SHIFT); + + res = SendMessageA(hwnd, WM_KEYDOWN, VK_DOWN, 0); + expect(0, res); + res = SendMessageA(hwnd, WM_KEYUP, VK_DOWN, 0); + expect(0, res); + + res = SendMessageA(hwnd, LVM_GETSELECTEDCOUNT, 0, 0); + expect(2, res); + + hold_key(VK_CONTROL); + + res = SendMessageA(hwnd, WM_KEYDOWN, VK_DOWN, 0); + expect(0, res); + res = SendMessageA(hwnd, WM_KEYUP, VK_DOWN, 0); + expect(0, res); + + release_key(VK_CONTROL); + release_key(VK_SHIFT); + + res = SendMessageA(hwnd, LVM_GETSELECTEDCOUNT, 0, 0); + expect(3, res); + + DestroyWindow(hwnd); +} + static void test_norecompute(void) { static CHAR testA[] = "test"; @@ -6682,6 +6732,7 @@ START_TEST(listview) test_subitem_rect(); test_sorting(); test_ownerdata(); + test_ownerdata_multiselect(); test_norecompute(); test_nosortheader(); test_setredraw(); @@ -6740,6 +6791,7 @@ START_TEST(listview) test_columns(); test_sorting(); test_ownerdata(); + test_ownerdata_multiselect(); test_norecompute(); test_nosortheader(); test_indentation();
1
0
0
0
Angelo Haller : comctl32/tests: Add hold_key and release_key functions.
by Alexandre Julliard
27 Mar '23
27 Mar '23
Module: wine Branch: oldstable Commit: 9513e43d9ca997ec4468397e26be36ed655b3f1e URL:
https://gitlab.winehq.org/wine/wine/-/commit/9513e43d9ca997ec4468397e26be36…
Author: Angelo Haller <angelo(a)szanni.org> Date: Thu Apr 28 08:20:09 2022 -0500 comctl32/tests: Add hold_key and release_key functions. Add functions to simulate the holding of keys like SHIFT, CTRL,... Move existing SHIFT key press emulation to these functions. Signed-off-by: Angelo Haller <angelo(a)szanni.org> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit 2d78448464f8e3d4f4e7419c42559de515acfcd2) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/comctl32/tests/listview.c | 35 ++++++++++++++++++++++++++--------- 1 file changed, 26 insertions(+), 9 deletions(-) diff --git a/dlls/comctl32/tests/listview.c b/dlls/comctl32/tests/listview.c index 236a9d14372..ffdb30bcaca 100644 --- a/dlls/comctl32/tests/listview.c +++ b/dlls/comctl32/tests/listview.c @@ -461,6 +461,30 @@ static const struct message listview_end_label_edit_kill_focus[] = { { 0 } }; +static void hold_key(int vk) +{ + BYTE kstate[256]; + BOOL res; + + res = GetKeyboardState(kstate); + ok(res, "GetKeyboardState failed.\n"); + kstate[vk] |= 0x80; + res = SetKeyboardState(kstate); + ok(res, "SetKeyboardState failed.\n"); +} + +static void release_key(int vk) +{ + BYTE kstate[256]; + BOOL res; + + res = GetKeyboardState(kstate); + ok(res, "GetKeyboardState failed.\n"); + kstate[vk] &= ~0x80; + res = SetKeyboardState(kstate); + ok(res, "SetKeyboardState failed.\n"); +} + static LRESULT WINAPI parent_wnd_proc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) { static LONG defwndproc_counter = 0; @@ -2355,7 +2379,6 @@ static void test_multiselect(void) int i, j; static const int items=5; DWORD item_count; - BYTE kstate[256]; select_task task; LONG_PTR style; LVITEMA item; @@ -2422,10 +2445,7 @@ static void test_multiselect(void) selected_count = SendMessageA(hwnd, LVM_GETSELECTEDCOUNT, 0, 0); ok(selected_count == 1, "expected 1, got %d\n", selected_count); - /* Set SHIFT key pressed */ - GetKeyboardState(kstate); - kstate[VK_SHIFT]=0x80; - SetKeyboardState(kstate); + hold_key(VK_SHIFT); for (j=1;j<=(task.count == -1 ? item_count : task.count);j++) { r = SendMessageA(hwnd, WM_KEYDOWN, task.loopVK, 0); @@ -2440,10 +2460,7 @@ static void test_multiselect(void) "Failed multiple selection %s. There should be %d selected items (is %d)\n", task.descr, item_count, selected_count); - /* Set SHIFT key released */ - GetKeyboardState(kstate); - kstate[VK_SHIFT]=0x00; - SetKeyboardState(kstate); + release_key(VK_SHIFT); } DestroyWindow(hwnd);
1
0
0
0
Dmitry Timoshkov : comctl32/tests: Add iItem and uChanged to LVN_ITEMCHANGING/LVN_ITEMCHANGED context.
by Alexandre Julliard
27 Mar '23
27 Mar '23
Module: wine Branch: oldstable Commit: 4696811b12d1ad8edbb8eb3293ae5bfeb89aaec3 URL:
https://gitlab.winehq.org/wine/wine/-/commit/4696811b12d1ad8edbb8eb3293ae5b…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Fri Feb 11 17:24:36 2022 +0300 comctl32/tests: Add iItem and uChanged to LVN_ITEMCHANGING/LVN_ITEMCHANGED context. Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru> Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit 8961e7220b9fe3e7dc6a43528ccb13f7dc9a8564) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/comctl32/tests/listview.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/dlls/comctl32/tests/listview.c b/dlls/comctl32/tests/listview.c index e95b81f5bb1..236a9d14372 100644 --- a/dlls/comctl32/tests/listview.c +++ b/dlls/comctl32/tests/listview.c @@ -472,7 +472,17 @@ static LRESULT WINAPI parent_wnd_proc(HWND hwnd, UINT message, WPARAM wParam, LP if (defwndproc_counter) msg.flags |= defwinproc; msg.wParam = wParam; msg.lParam = lParam; - if (message == WM_NOTIFY && lParam) msg.id = ((NMHDR*)lParam)->code; + if (message == WM_NOTIFY && lParam) + { + NMLISTVIEW *nmlv = (NMLISTVIEW *)lParam; + + msg.id = nmlv->hdr.code; + if (msg.id == LVN_ITEMCHANGING || msg.id == LVN_ITEMCHANGED) + { + msg.wParam = nmlv->iItem; + msg.lParam = nmlv->uChanged; + } + } if (message == WM_COMMAND) msg.id = HIWORD(wParam); /* log system messages, except for painting */
1
0
0
0
Santino Mazza : riched20: Ensure that cursor is visible when selecting text.
by Alexandre Julliard
27 Mar '23
27 Mar '23
Module: wine Branch: oldstable Commit: 3ef233435c0d76610957d3be33103b0bebad460c URL:
https://gitlab.winehq.org/wine/wine/-/commit/3ef233435c0d76610957d3be33103b…
Author: Santino Mazza <mazzasantino1206(a)gmail.com> Date: Tue Jul 19 14:13:58 2022 -0300 riched20: Ensure that cursor is visible when selecting text. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=40444
Signed-off-by: Santino Mazza <mazzasantino1206(a)gmail.com> (cherry picked from commit 25209c162fc209124b369abbad55d915d31909b2) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/riched20/editor.c | 1 + dlls/riched20/tests/editor.c | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/riched20/editor.c b/dlls/riched20/editor.c index 429f023ebe4..a7dee6682a7 100644 --- a/dlls/riched20/editor.c +++ b/dlls/riched20/editor.c @@ -2142,6 +2142,7 @@ int set_selection( ME_TextEditor *editor, int to, int from ) if (!editor->bHideSelection) ME_InvalidateSelection( editor ); end = set_selection_cursors( editor, to, from ); + editor_ensure_visible( editor, &editor->pCursors[0] ); if (!editor->bHideSelection) ME_InvalidateSelection( editor ); update_caret( editor ); ME_SendSelChange( editor ); diff --git a/dlls/riched20/tests/editor.c b/dlls/riched20/tests/editor.c index 430bb81a773..24ada648c6e 100644 --- a/dlls/riched20/tests/editor.c +++ b/dlls/riched20/tests/editor.c @@ -5032,7 +5032,6 @@ static void check_EM_SETSEL_multiline(HWND hwnd) oldY = get_scroll_pos_y(hwnd); SendMessageA(hwnd, EM_SETSEL, 59, 59); curY = get_scroll_pos_y(hwnd); - todo_wine ok(oldY < curY, "oldY %d >= curY %d\n", oldY, curY); }
1
0
0
0
Santino Mazza : riched20/tests: When selection is out of view, the scrollbar should move.
by Alexandre Julliard
27 Mar '23
27 Mar '23
Module: wine Branch: oldstable Commit: 8ceee3b79b10e78abfc6e95fa89f2e9b9c44adb5 URL:
https://gitlab.winehq.org/wine/wine/-/commit/8ceee3b79b10e78abfc6e95fa89f2e…
Author: Santino Mazza <mazzasantino1206(a)gmail.com> Date: Tue Jul 19 14:11:27 2022 -0300 riched20/tests: When selection is out of view, the scrollbar should move. Signed-off-by: Santino Mazza <mazzasantino1206(a)gmail.com> (cherry picked from commit ee131e9eba7dad090f0baf4a73fab2d62dc73b52) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/riched20/tests/editor.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/dlls/riched20/tests/editor.c b/dlls/riched20/tests/editor.c index 85f7c00383a..430bb81a773 100644 --- a/dlls/riched20/tests/editor.c +++ b/dlls/riched20/tests/editor.c @@ -5018,6 +5018,24 @@ static void check_EM_SETSEL(HWND hwnd, const struct exsetsel_s *setsel, int id) id, setsel->expected_getsel_start, setsel->expected_getsel_end, start, end); } +/* When the selection is out of the windows view, the scrollbar should move. */ +static void check_EM_SETSEL_multiline(HWND hwnd) +{ + int oldY; + int curY; + const char textwithlines[] = "This is a text\n" + "with lines\n" + "I expect this text\n" + "to be\nlarge\nenough\n"; + + SendMessageA(hwnd, WM_SETTEXT, 0, (LPARAM)textwithlines); + oldY = get_scroll_pos_y(hwnd); + SendMessageA(hwnd, EM_SETSEL, 59, 59); + curY = get_scroll_pos_y(hwnd); + todo_wine + ok(oldY < curY, "oldY %d >= curY %d\n", oldY, curY); +} + static void test_EM_SETSEL(void) { char buffA[32] = {0}; @@ -5058,6 +5076,8 @@ static void test_EM_SETSEL(void) ok(sel_end == 8, "Selection end incorrectly: %d expected 8\n", sel_end); } + check_EM_SETSEL_multiline(hwndRichEdit); + DestroyWindow(hwndRichEdit); }
1
0
0
0
← Newer
1
...
24
25
26
27
28
29
30
...
91
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
Results per page:
10
25
50
100
200