https://git.reactos.org/?p=reactos.git;a=commitdiff;h=b45debb93aa6a5da07b3d5563194e3d700cfffef

commit b45debb93aa6a5da07b3d5563194e3d700cfffef
Author:     Miguel Almeida <miguelbarraalme...@gmail.com>
AuthorDate: Tue Mar 11 12:49:39 2025 +0000
Commit:     GitHub <nore...@github.com>
CommitDate: Tue Mar 11 13:49:39 2025 +0100

    [COMCTL32] Fix shift-selecting files not working as expected in small/large 
icons views (#7729)
    
    CORE-10386
    
    Fixes the behavior when selecting multiple files in a folder with the Shift 
key, while using either the Large Icons or Small Icons view, so that it is 
consistent with how it works on Windows.
    
    Proposed changes:
    Disable the specialized code for these views in LISTVIEW_SetGroupSelection, 
using the same code as for the list and details views, which also works fine 
for them.
---
 dll/win32/comctl32/listview.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/dll/win32/comctl32/listview.c b/dll/win32/comctl32/listview.c
index c94b85fac64..eb165e835c4 100644
--- a/dll/win32/comctl32/listview.c
+++ b/dll/win32/comctl32/listview.c
@@ -3725,8 +3725,10 @@ static void LISTVIEW_SetGroupSelection(LISTVIEW_INFO 
*infoPtr, INT nItem)
     item.state = LVIS_SELECTED; 
     item.stateMask = LVIS_SELECTED;
 
+#ifndef __REACTOS__
     if ((infoPtr->uView == LV_VIEW_LIST) || (infoPtr->uView == 
LV_VIEW_DETAILS))
     {
+#endif
        if (infoPtr->nSelectionMark == -1)
        {
            infoPtr->nSelectionMark = nItem;
@@ -3740,6 +3742,7 @@ static void LISTVIEW_SetGroupSelection(LISTVIEW_INFO 
*infoPtr, INT nItem)
            sel.upper = max(infoPtr->nSelectionMark, nItem) + 1;
            ranges_add(selection, sel);
        }
+#ifndef __REACTOS__
     }
     else
     {
@@ -3765,6 +3768,7 @@ static void LISTVIEW_SetGroupSelection(LISTVIEW_INFO 
*infoPtr, INT nItem)
        }
        iterator_destroy(&i);
     }
+#endif
 
     /* disable per item notifications on LVS_OWNERDATA style
        FIXME: single LVN_ODSTATECHANGED should be used */

Reply via email to