comctl32/listview: Update view on style change only if LVS_TYPEMASK styles have changed.
This commit is contained in:
parent
cc737bd460
commit
b6dc726bbd
|
@ -11067,7 +11067,6 @@ static INT LISTVIEW_StyleChanged(LISTVIEW_INFO *infoPtr, WPARAM wStyleType,
|
|||
if (wStyleType != GWL_STYLE) return 0;
|
||||
|
||||
infoPtr->dwStyle = lpss->styleNew;
|
||||
map_style_view(infoPtr);
|
||||
|
||||
if (((lpss->styleOld & WS_HSCROLL) != 0)&&
|
||||
((lpss->styleNew & WS_HSCROLL) == 0))
|
||||
|
@ -11080,7 +11079,10 @@ static INT LISTVIEW_StyleChanged(LISTVIEW_INFO *infoPtr, WPARAM wStyleType,
|
|||
if (uNewView != uOldView)
|
||||
{
|
||||
HIMAGELIST himl;
|
||||
|
||||
|
||||
/* LVM_SETVIEW doesn't change window style bits within LVS_TYPEMASK,
|
||||
changing style updates current view only when view bits change. */
|
||||
map_style_view(infoPtr);
|
||||
SendMessageW(infoPtr->hwndEdit, WM_KILLFOCUS, 0, 0);
|
||||
ShowWindow(infoPtr->hwndHeader, SW_HIDE);
|
||||
|
||||
|
|
|
@ -4554,6 +4554,12 @@ static void test_get_set_view(void)
|
|||
style = GetWindowLongPtrA(hwnd, GWL_STYLE);
|
||||
ok(style & LVS_LIST, "Expected style to be preserved\n");
|
||||
|
||||
/* now change window style to see if view is remapped */
|
||||
style = GetWindowLongPtrA(hwnd, GWL_STYLE);
|
||||
SetWindowLongPtrA(hwnd, GWL_STYLE, style | LVS_SHOWSELALWAYS);
|
||||
ret = SendMessageA(hwnd, LVM_GETVIEW, 0, 0);
|
||||
expect(LV_VIEW_SMALLICON, ret);
|
||||
|
||||
DestroyWindow(hwnd);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue