Listview R4

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




ChangeLog
  Compute only the old state that we're gonna look at.

--- dlls/comctl32/listview.c.R3	Wed Oct 16 01:09:47 2002
+++ dlls/comctl32/listview.c	Wed Oct 16 08:34:41 2002
@@ -2782,9 +2782,9 @@
     /* a virtual listview stores only the state for the main item */
     if (lpLVItem->iSubItem || !(lpLVItem->mask & LVIF_STATE)) return FALSE;
 
-    oldState = LISTVIEW_GetItemState(infoPtr, lpLVItem->iItem, LVIS_FOCUSED | LVIS_SELECTED);
-    TRACE("oldState=%x, newState=%x, uCallbackMask=%x\n", 
-	  oldState, lpLVItem->state, infoPtr->uCallbackMask);
+    oldState = (LVIS_FOCUSED | LVIS_SELECTED) & ~infoPtr->uCallbackMask;
+    if (oldState) oldState = LISTVIEW_GetItemState(infoPtr, lpLVItem->iItem, oldState);
+    TRACE("oldState=%x, newState=%x\n", oldState, lpLVItem->state);
 
     /* we're done if we don't need to change anything we handle */
     if ( !((oldState ^ lpLVItem->state) & lpLVItem->stateMask &
@@ -2860,9 +2860,10 @@
     if (!lpItem) return FALSE;
 
     /* we need to handle the focus, and selection differently */
-    oldState = LISTVIEW_GetItemState(infoPtr, lpLVItem->iItem, LVIS_FOCUSED | LVIS_SELECTED);
+    oldState = (LVIS_FOCUSED | LVIS_SELECTED) & ~infoPtr->uCallbackMask;
+    if (oldState) oldState = LISTVIEW_GetItemState(infoPtr, lpLVItem->iItem, oldState);
 
-    TRACE("lpItem->state=0x%x\n", lpItem->state);
+    TRACE("oldState=0x%x, state=0x%x\n", oldState, lpItem->state);
     /* determine what fields will change */    
     if ((lpLVItem->mask & LVIF_STATE) && ((oldState ^ lpLVItem->state) & lpLVItem->stateMask & ~infoPtr->uCallbackMask))
 	uChanged |= LVIF_STATE;



[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux