https://git.reactos.org/?p=reactos.git;a=commitdiff;h=08364d08c73c5fd95b2c1…
commit 08364d08c73c5fd95b2c1a8dacc983060d35e473
Author: Charles Ambrye <giawa(a)hotmail.com>
AuthorDate: Wed Apr 15 08:59:18 2020 -0700
Commit: Giannis Adamopoulos <gadamopoulos(a)reactos.org>
CommitDate: Fri Apr 17 13:23:29 2020 +0300
[COMCTL32] Do not allow user to move icons when in auto-arrange mode
---
dll/win32/comctl32/listview.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/dll/win32/comctl32/listview.c b/dll/win32/comctl32/listview.c
index ee2524faddf..3d04f103fb2 100644
--- a/dll/win32/comctl32/listview.c
+++ b/dll/win32/comctl32/listview.c
@@ -8992,6 +8992,12 @@ static BOOL LISTVIEW_SetItemPosition(LISTVIEW_INFO *infoPtr, INT
nItem, const PO
if (!pt || nItem < 0 || nItem >= infoPtr->nItemCount ||
!(infoPtr->uView == LV_VIEW_ICON || infoPtr->uView == LV_VIEW_SMALLICON)) return
FALSE;
+#ifdef __REACTOS__
+ /* FIXME: This should really call snap to grid if auto-arrange is enabled
+ and limit the size of the grid to nItemCount elements */
+ if (is_autoarrange(infoPtr)) return FALSE;
+#endif
+
Pt = *pt;
LISTVIEW_GetOrigin(infoPtr, &Origin);