Commit 26a470e1 authored by Alexandre Julliard's avatar Alexandre Julliard

set_main_item: ignore meaningless bits in stateMask for LVS_OWNERDATA

instead of failing.
parent ae8b795f
...@@ -3102,7 +3102,7 @@ static BOOL set_main_item(LISTVIEW_INFO *infoPtr, const LVITEMW *lpLVItem, BOOL ...@@ -3102,7 +3102,7 @@ static BOOL set_main_item(LISTVIEW_INFO *infoPtr, const LVITEMW *lpLVItem, BOOL
if (infoPtr->dwStyle & LVS_OWNERDATA) if (infoPtr->dwStyle & LVS_OWNERDATA)
{ {
/* a virtual listview we stores only selection and focus */ /* a virtual listview we stores only selection and focus */
if ((lpLVItem->mask & ~LVIF_STATE) || (lpLVItem->stateMask & ~(LVIS_FOCUSED | LVIS_SELECTED))) if (lpLVItem->mask & ~LVIF_STATE)
return FALSE; return FALSE;
lpItem = NULL; lpItem = NULL;
} }
...@@ -3170,7 +3170,7 @@ static BOOL set_main_item(LISTVIEW_INFO *infoPtr, const LVITEMW *lpLVItem, BOOL ...@@ -3170,7 +3170,7 @@ static BOOL set_main_item(LISTVIEW_INFO *infoPtr, const LVITEMW *lpLVItem, BOOL
if (uChanged & LVIF_STATE) if (uChanged & LVIF_STATE)
{ {
if (lpLVItem->stateMask & ~infoPtr->uCallbackMask & ~(LVIS_FOCUSED | LVIS_SELECTED)) if (lpItem && (lpLVItem->stateMask & ~infoPtr->uCallbackMask & ~(LVIS_FOCUSED | LVIS_SELECTED)))
{ {
lpItem->state &= ~lpLVItem->stateMask; lpItem->state &= ~lpLVItem->stateMask;
lpItem->state |= (lpLVItem->state & lpLVItem->stateMask); lpItem->state |= (lpLVItem->state & lpLVItem->stateMask);
......
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