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

commit ae79d1af90bfb1281720329540f470d5e980d639
Author:     Whindmar Saksit <whinds...@proton.me>
AuthorDate: Wed Feb 19 15:26:49 2025 +0100
Commit:     GitHub <nore...@github.com>
CommitDate: Wed Feb 19 15:26:49 2025 +0100

    [COMCTL32] ListView LVIS_CUT image does not depend on focus (#7724)
    
    Also undoes flicker caused by PR #4218.
---
 dll/win32/comctl32/listview.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/dll/win32/comctl32/listview.c b/dll/win32/comctl32/listview.c
index 5279c7b0d27..c94b85fac64 100644
--- a/dll/win32/comctl32/listview.c
+++ b/dll/win32/comctl32/listview.c
@@ -2270,11 +2270,7 @@ static void LISTVIEW_InvalidateSelectedItems(const 
LISTVIEW_INFO *infoPtr)
     iterator_frameditems(&i, infoPtr, &infoPtr->rcList); 
     while(iterator_next(&i))
     {
-#ifdef __REACTOS__
-       if (LISTVIEW_GetItemState(infoPtr, i.nItem, LVIS_SELECTED | LVIS_CUT))
-#else
        if (LISTVIEW_GetItemState(infoPtr, i.nItem, LVIS_SELECTED))
-#endif
            LISTVIEW_InvalidateItem(infoPtr, i.nItem);
     }
     iterator_destroy(&i);
@@ -4782,7 +4778,11 @@ static void LISTVIEW_DrawItemPart(LISTVIEW_INFO 
*infoPtr, LVITEMW *item, const N
 
         TRACE("iImage=%d\n", item->iImage);
 
+#ifdef __REACTOS__
+        if (item->state & (LVIS_CUT | (infoPtr->bFocus ? LVIS_SELECTED : 0)))
+#else
         if (item->state & (LVIS_SELECTED | LVIS_CUT) && infoPtr->bFocus)
+#endif
             style = ILD_SELECTED;
         else
             style = ILD_NORMAL;

Reply via email to