comctl32/listview: Don't repaint when handling WM_STYLECHANGED.

Some applications subclass listview and change style multiple times when painting. Invalidating
control when handling WM_STYLECHANGED causes infinite WM_PAINT messages in this case and end up
stalling the message queue.
This commit is contained in:
Zhiyi Zhang 2022-10-17 16:06:09 +08:00 committed by Alexandre Julliard
parent 44cfa3ec1a
commit a8396d8b1e
2 changed files with 1 additions and 4 deletions

View file

@ -11298,9 +11298,6 @@ static INT LISTVIEW_StyleChanged(LISTVIEW_INFO *infoPtr, WPARAM wStyleType,
/* add scrollbars if needed */
LISTVIEW_UpdateScroll(infoPtr);
/* invalidate client area + erase background */
LISTVIEW_InvalidateList(infoPtr);
return 0;
}

View file

@ -1096,7 +1096,7 @@ static void test_WM_STYLECHANGED(void)
{HOTKEY_CLASSA, wm_stylechanged_seq},
{WC_IPADDRESSA, wm_stylechanged_seq},
{WC_LISTBOXA, wm_stylechanged_repaint_seq, TRUE},
{WC_LISTVIEWA, wm_stylechanged_seq, TRUE},
{WC_LISTVIEWA, wm_stylechanged_seq},
{MONTHCAL_CLASSA, wm_stylechanged_repaint_seq, TRUE},
{WC_NATIVEFONTCTLA, wm_stylechanged_seq},
{WC_PAGESCROLLERA, wm_stylechanged_pager_seq, TRUE},