Commit 1f1f9902 authored by Zhiyi Zhang's avatar Zhiyi Zhang Committed by Alexandre Julliard

comctl32/listview: Repaint when changing view styles.

Changing listview view styles should repaint according to the tests in test_WM_STYLECHANGED(). Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=54215
parent cc84be8d
......@@ -11212,6 +11212,7 @@ static INT LISTVIEW_StyleChanged(LISTVIEW_INFO *infoPtr, WPARAM wStyleType,
const STYLESTRUCT *lpss)
{
UINT uNewView, uOldView;
BOOL repaint = FALSE;
UINT style;
TRACE("styletype %Ix, styleOld %#lx, styleNew %#lx\n",
......@@ -11236,6 +11237,8 @@ static INT LISTVIEW_StyleChanged(LISTVIEW_INFO *infoPtr, WPARAM wStyleType,
{
HIMAGELIST himl;
repaint = TRUE;
/* 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);
......@@ -11297,6 +11300,9 @@ static INT LISTVIEW_StyleChanged(LISTVIEW_INFO *infoPtr, WPARAM wStyleType,
/* add scrollbars if needed */
LISTVIEW_UpdateScroll(infoPtr);
if (repaint)
LISTVIEW_InvalidateList(infoPtr);
return 0;
}
......
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