Commit e37692bd authored by Dimitrie O. Paun's avatar Dimitrie O. Paun Committed by Alexandre Julliard

When removing focus, no need to go through all elements.

parent feb32611
......@@ -2608,7 +2608,7 @@ static inline BOOL LISTVIEW_SetItemFocus(LISTVIEW_INFO *infoPtr, INT nItem)
lvItem.state = nItem == -1 ? 0 : LVIS_FOCUSED;
lvItem.stateMask = LVIS_FOCUSED;
LISTVIEW_SetItemState(infoPtr, nItem, &lvItem);
LISTVIEW_SetItemState(infoPtr, nItem == -1 ? infoPtr->nFocusedItem : nItem, &lvItem);
return oldFocus != infoPtr->nFocusedItem;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment