Module: wine Branch: master Commit: 1f1f99025d92e8e8b4428f3efc103ba7be9b63b8 URL: https://gitlab.winehq.org/wine/wine/-/commit/1f1f99025d92e8e8b4428f3efc103ba...
Author: Zhiyi Zhang zzhang@codeweavers.com Date: Sun Jan 22 12:39:53 2023 +0800
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
---
dlls/comctl32/listview.c | 6 ++++++ 1 file changed, 6 insertions(+)
diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c index 07bea8574b6..fc22818c37b 100644 --- a/dlls/comctl32/listview.c +++ b/dlls/comctl32/listview.c @@ -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; }