Commit b6dc726b authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

comctl32/listview: Update view on style change only if LVS_TYPEMASK styles have changed.

parent cc737bd4
......@@ -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);
}
......
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